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.
26 lines
785 B
React
26 lines
785 B
React
2 years ago
|
import './bootstrap';
|
||
|
import '../css/app.css';
|
||
3 years ago
|
|
||
3 years ago
|
import React from 'react'
|
||
|
import { render } from 'react-dom'
|
||
|
import { createInertiaApp } from '@inertiajs/inertia-react'
|
||
|
import { InertiaProgress } from '@inertiajs/progress'
|
||
3 years ago
|
import 'react-toastify/dist/ReactToastify.css'
|
||
2 years ago
|
import { resolvePageComponent } from "laravel-vite-plugin/inertia-helpers";
|
||
3 years ago
|
|
||
3 years ago
|
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel'
|
||
3 years ago
|
|
||
|
createInertiaApp({
|
||
|
title: (title) => `${title} - ${appName}`,
|
||
2 years ago
|
resolve: (name) =>
|
||
|
resolvePageComponent(
|
||
|
`./Pages/${name}.jsx`,
|
||
|
import.meta.glob('./Pages/**/*.jsx')
|
||
|
),
|
||
3 years ago
|
setup({ el, App, props }) {
|
||
|
return render(<App {...props} />, el);
|
||
|
},
|
||
|
});
|
||
|
|
||
3 years ago
|
InertiaProgress.init({ color: '#570df8' })
|