Skip to content

Commit

Permalink
Fix: ルート構成をいじいじ
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinaticSystem committed Jul 2, 2024
1 parent 0d5d363 commit 22e20b5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
5 changes: 3 additions & 2 deletions frontend/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ export const Route = createRootRoute({
</>
),
staticData: {
// RootRouteのOGP情報は使用しないが型定義上何かしら入れる必要がある
ogp: {
title: "",
description: "",
title: "NO_USE",
description: "NO_USE",
},
},
});
16 changes: 3 additions & 13 deletions frontend/src/routes/login/route.lazy.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import { Button } from "@mantine/core";
import { Link, createLazyFileRoute } from "@tanstack/react-router";
import { createLazyFileRoute } from "@tanstack/react-router";

import { Login } from "./route";

export const Route = createLazyFileRoute("/login")({
component: Login,
});

function Login() {
return (
<>
<p>Login Page</p>
<Link to="/">
<Button>Top</Button>
</Link>
</>
);
}
23 changes: 23 additions & 0 deletions frontend/src/routes/login/route.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Button } from "@mantine/core";
import { Link, createFileRoute } from "@tanstack/react-router";

export const Route = createFileRoute("/login")({
component: Login,
staticData: {
ogp: {
title: "Frost | Login",
description: "Login",
},
},
});

export function Login() {
return (
<>
<p>Login Page</p>
<Link to="/">
<Button>Top</Button>
</Link>
</>
);
}

0 comments on commit 22e20b5

Please sign in to comment.