Wire admin studio SSR and search infrastructure
This commit is contained in:
17
resources/js/forum.jsx
Normal file
17
resources/js/forum.jsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { mountInertiaRoot } from './bootstrap'
|
||||
import React from 'react'
|
||||
import { createInertiaApp } from '@inertiajs/react'
|
||||
|
||||
const pages = import.meta.glob('./Pages/Forum/*.jsx', { eager: true })
|
||||
|
||||
createInertiaApp({
|
||||
resolve: (name) => {
|
||||
const key = `./Pages/Forum/${name.replace('Forum/', '')}.jsx`
|
||||
const module = pages[key]
|
||||
if (!module) throw new Error(`Inertia forum page not found: ${name}`)
|
||||
return module.default
|
||||
},
|
||||
setup({ el, App, props }) {
|
||||
mountInertiaRoot(el, App, props)
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user