chore: basic layout

This commit is contained in:
2025-08-04 14:11:10 +08:00
parent 9a45304dd9
commit 0bece963c8
3 changed files with 5 additions and 7 deletions

View File

@@ -1,11 +1,9 @@
import { createFileRoute } from '@tanstack/react-router'; import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute('/_app/dashboard')({ export const Route = createFileRoute('/_app/dashboard')({
component: Dashboard, component: DashboardPage,
}); });
function Dashboard() { function DashboardPage() {
return ( return <div>Hello from "/_app/dashboard"!</div>;
<h3>Welcome Home!</h3>
);
} }

View File

@@ -5,5 +5,5 @@ export const Route = createFileRoute('/_app/device')({
}); });
function DevicePage() { function DevicePage() {
return <div>Hello from Device!</div>; return <div>Hello from "/_app/device"!</div>;
} }

View File

@@ -2,7 +2,7 @@ import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute('/')({ export const Route = createFileRoute('/')({
// TODO: 登录校验 // TODO: 登录校验
beforeLoad: () => { beforeLoad: async () => {
throw redirect({ to: '/dashboard' }); throw redirect({ to: '/dashboard' });
}, },
}); });