//? intent: The signed-in home surface — replace this with what your app is actually for. //? Sample page. The framework's file-based router maps this to `/dashboard`. //? Add APIs in `_api/` and sync events in `_sync/` next to this file. import { useTranslator } from '@luckystack/core/client'; import type { PageMiddleware } from '@luckystack/core/client'; import type { SessionLayout } from '../../config'; const Dashboard = () => { const translate = useTranslator(); return (

{translate({ key: 'dashboard.title' })}

{translate({ key: 'dashboard.description' })}

); }; export const template = 'plain' as const; //? Per-page route guard. Logged-out visitors bounce to `/login`. Customize //? the function body for role-checks (e.g. `if (!session.admin) return;` //? returns `undefined` which sends the user back in browser history). export const middleware: PageMiddleware = ({ session }) => { if (!session) return { success: false, redirect: '/login' }; return { success: true }; }; export default Dashboard;