You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
777 B
React
23 lines
777 B
React
1 year ago
|
import './bootstrap';
|
||
|
import '../css/app.css';
|
||
|
import 'flowbite';
|
||
|
import 'react-toastify/dist/ReactToastify.css';
|
||
|
|
||
|
import React from 'react';
|
||
|
import { createRoot } from 'react-dom/client';
|
||
|
import { createInertiaApp } from '@inertiajs/react';
|
||
|
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
|
||
|
|
||
|
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
|
||
|
|
||
|
createInertiaApp({
|
||
|
title: (title) => `${title} - ${appName}`,
|
||
|
resolve: (name) => resolvePageComponent(`./Pages/${name}.jsx`, import.meta.glob('./Pages/**/*.jsx')),
|
||
|
setup({ el, App, props }) {
|
||
|
const root = createRoot(el);
|
||
|
|
||
|
root.render(<App {...props} />);
|
||
|
},
|
||
|
progress: { color: '#003bf1' , showSpinner: true, includeCSS: true},
|
||
|
});
|