Skip to content

Commit

Permalink
fix: add run to composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
irsyadadl committed Oct 16, 2024
1 parent 71ecdae commit ad00c97
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
8 changes: 2 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@


## [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))
- 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)


### Bug Fixes

* add ziggy location to inertia middleware ([a40dbc6](https://github.com/justdlabs/inertia.ts/commit/a40dbc68fe0650f9f6b8756067932521e45f805b))
- add ziggy location to inertia middleware ([a40dbc6](https://github.com/justdlabs/inertia.ts/commit/a40dbc68fe0650f9f6b8756067932521e45f805b))

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

Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
"npm install",
"npm uninstall husky",
"npm run dev "
],
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail\" \"npm run dev\" --names=server,queue,logs,vite"
]
},
"extra": {
Expand Down
30 changes: 15 additions & 15 deletions resources/js/app.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import '../css/app.css'
import './bootstrap'
import '../css/app.css';
import './bootstrap';

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'
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';

const appName = import.meta.env.VITE_APP_NAME || 'Irsyad'
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.SSR) {
hydrateRoot(el, appElement)
return
hydrateRoot(el, appElement);
return;
}

createRoot(el).render(appElement)
createRoot(el).render(appElement);
},
progress: false
})
});

0 comments on commit ad00c97

Please sign in to comment.