mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
31 lines
660 B
TypeScript
31 lines
660 B
TypeScript
import { defineConfig } from '@adonisjs/inertia';
|
|
|
|
export default defineConfig({
|
|
/**
|
|
* Path to the Edge view that will be used as the root view for Inertia responses
|
|
*/
|
|
rootView: 'inertia_layout',
|
|
|
|
/**
|
|
* Data that should be shared with all rendered pages
|
|
*/
|
|
sharedData: {
|
|
errors: (ctx) => ctx.session?.flashMessages.get('errors'),
|
|
auth: async (ctx) => {
|
|
await ctx.auth.check();
|
|
return {
|
|
user: ctx.auth.user,
|
|
isAuthenticated: ctx.auth.isAuthenticated,
|
|
};
|
|
},
|
|
},
|
|
|
|
/**
|
|
* Options for the server-side rendering
|
|
*/
|
|
ssr: {
|
|
enabled: true,
|
|
entrypoint: 'inertia/app/ssr.tsx',
|
|
},
|
|
});
|