mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
feat: add i18n with type safety
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/// <reference path="../../adonisrc.ts" />
|
||||
|
||||
import { resolvePageComponent } from '@adonisjs/inertia/helpers';
|
||||
import { createInertiaApp } from '@inertiajs/react';
|
||||
import { hydrateRoot } from 'react-dom/client';
|
||||
import { theme } from '~/styles/theme';
|
||||
|
||||
import '../i18n/index';
|
||||
|
||||
const appName = import.meta.env.VITE_APP_NAME || 'MyLinks';
|
||||
|
||||
createInertiaApp({
|
||||
@@ -13,7 +13,10 @@ createInertiaApp({
|
||||
title: (title) => `${appName}${title && ` - ${title}`}`,
|
||||
|
||||
resolve: (name) => {
|
||||
return resolvePageComponent(`../pages/${name}.tsx`, import.meta.glob('../pages/**/*.tsx'));
|
||||
return resolvePageComponent(
|
||||
`../pages/${name}.tsx`,
|
||||
import.meta.glob('../pages/**/*.tsx')
|
||||
);
|
||||
},
|
||||
|
||||
setup({ el, App, props }) {
|
||||
|
||||
Reference in New Issue
Block a user