Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11.x #111

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@


## [1.0.30](https://github.com/justdlabs/inertia.ts/compare/1.0.29...1.0.30) (2024-10-16)


### Bug Fixes

* fix app.tsx ([bacb103](https://github.com/justdlabs/inertia.ts/commit/bacb103bf0293d4ddaf68391a55b5337bdc59674))

## [1.0.29](https://github.com/justdlabs/inertia.ts/compare/1.0.28...1.0.29) (2024-10-16)


Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "justd/laravel",
"version": "1.0.29",
"version": "1.0.30",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@
}
}
},
"version": "1.0.29"
"version": "1.0.30"
}
36 changes: 17 additions & 19 deletions resources/js/app.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
import '../css/app.css';
import './bootstrap';
import '../css/app.css'
import './bootstrap'

import { Ziggy } from '@/ziggy';
import { createInertiaApp } from '@inertiajs/react';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { createRoot, hydrateRoot } from 'react-dom/client';
import { useRoute } from 'ziggy-js';
import { Providers } from './providers';
import { Ziggy } from '@/ziggy'
import { createInertiaApp } from '@inertiajs/react'
import { Providers } from './providers'
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
import { createRoot, hydrateRoot } from 'react-dom/client'
import { useRoute } from 'ziggy-js'

const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
const appName = import.meta.env.VITE_APP_NAME || 'Irsyad'

createInertiaApp({
title: (title) => (title ? `${title} / ${appName}` : appName),
resolve: (name) => resolvePageComponent(`./pages/${name}.tsx`, import.meta.glob('./pages/**/*.tsx')),
setup({ el, App, props }) {
window.route = useRoute(Ziggy as any);
window.route = useRoute(Ziggy as any)
const appElement = (
<Providers>
<App {...props} />
</Providers>
);
if (import.meta.env.DEV) {
createRoot(el).render(appElement);
return;
)
if (import.meta.env.SSR) {
hydrateRoot(el, appElement)
return
}

hydrateRoot(el, appElement);
createRoot(el).render(appElement)
},
progress: {
color: '#4B5563'
}
});
progress: false
})
Loading