diff --git a/src/routes/_app/dashboard.tsx b/src/routes/_app/dashboard.tsx
index b388ac5..04c69fc 100644
--- a/src/routes/_app/dashboard.tsx
+++ b/src/routes/_app/dashboard.tsx
@@ -1,11 +1,9 @@
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute('/_app/dashboard')({
- component: Dashboard,
+ component: DashboardPage,
});
-function Dashboard() {
- return (
-
Welcome Home!
- );
+function DashboardPage() {
+ return Hello from "/_app/dashboard"!
;
}
diff --git a/src/routes/_app/device.tsx b/src/routes/_app/device.tsx
index f90ae46..c9137b9 100644
--- a/src/routes/_app/device.tsx
+++ b/src/routes/_app/device.tsx
@@ -5,5 +5,5 @@ export const Route = createFileRoute('/_app/device')({
});
function DevicePage() {
- return Hello from Device!
;
+ return Hello from "/_app/device"!
;
}
diff --git a/src/routes/index.tsx b/src/routes/index.tsx
index 3f64ca6..bff3af6 100644
--- a/src/routes/index.tsx
+++ b/src/routes/index.tsx
@@ -2,7 +2,7 @@ import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute('/')({
// TODO: 登录校验
- beforeLoad: () => {
+ beforeLoad: async () => {
throw redirect({ to: '/dashboard' });
},
});