feat: replace login route with auth modal
- Add AuthModal to root layout driven by ?modal=auth search param - Update multiplayer and play beforeLoad redirects to use modal - Update NavAuth and Hero links to use modal - Delete login route and NavLogin component
This commit is contained in:
parent
32ee1edf80
commit
dc11213cb5
8 changed files with 41 additions and 79 deletions
|
|
@ -132,7 +132,7 @@ export const Route = createFileRoute("/play")({
|
|||
beforeLoad: async () => {
|
||||
const { data: session } = await authClient.getSession();
|
||||
if (!session) {
|
||||
throw redirect({ to: "/login" });
|
||||
throw redirect({ to: "/", search: { modal: "auth", redirect: "/play" } });
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue