mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
23 lines
604 B
TypeScript
23 lines
604 B
TypeScript
/// <reference path="../../adonisrc.ts" />
|
|
|
|
import { resolvePageComponent } from '@adonisjs/inertia/helpers';
|
|
import { createInertiaApp } from '@inertiajs/react';
|
|
import { hydrateRoot } from 'react-dom/client';
|
|
import '../css/app.css';
|
|
|
|
const appName = import.meta.env.VITE_APP_NAME || 'AdonisJS';
|
|
|
|
createInertiaApp({
|
|
progress: { color: '#5468FF' },
|
|
|
|
title: (title) => `${title} - ${appName}`,
|
|
|
|
resolve: (name) => {
|
|
return resolvePageComponent(`../pages/${name}.tsx`, import.meta.glob('../pages/**/*.tsx'));
|
|
},
|
|
|
|
setup({ el, App, props }) {
|
|
hydrateRoot(el, <App {...props} />);
|
|
},
|
|
});
|