refactor(dashboard,history): replace ViewModels with Pinia stores and improve backend
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { createInertiaApp } from '@inertiajs/vue3';
|
||||
import I18NextVue from 'i18next-vue';
|
||||
import { createPinia } from 'pinia';
|
||||
import type { DefineComponent } from 'vue';
|
||||
import i18next from './lang/init';
|
||||
import Layout from './layouts/Layout.vue';
|
||||
|
||||
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
|
||||
const pinia = createPinia();
|
||||
|
||||
createInertiaApp({
|
||||
title: (title) => (title ? `${title} - ${appName}` : appName),
|
||||
@@ -33,6 +35,7 @@ createInertiaApp({
|
||||
return pages[`./pages/${name}.vue`];
|
||||
},
|
||||
withApp(app, options) {
|
||||
app.use(pinia);
|
||||
app.use(I18NextVue, {
|
||||
i18next,
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user