aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-06 22:54:21 +0900
committernsfisis <nsfisis@gmail.com>2024-08-06 22:54:21 +0900
commit401a28944fc0408811aedadd1c3104e2e2d4d7fe (patch)
tree165d920a65fa4a856ef1d468b1536d2518088e44 /frontend
parentdff6cfdc04fb7c93f74a53787539702cf6b982a9 (diff)
downloadiosdc-japan-2024-albatross-401a28944fc0408811aedadd1c3104e2e2d4d7fe.tar.gz
iosdc-japan-2024-albatross-401a28944fc0408811aedadd1c3104e2e2d4d7fe.tar.zst
iosdc-japan-2024-albatross-401a28944fc0408811aedadd1c3104e2e2d4d7fe.zip
feat(frontend): redirect / to /dashboard if user is logged in
Diffstat (limited to 'frontend')
-rw-r--r--frontend/app/routes/_index.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/frontend/app/routes/_index.tsx b/frontend/app/routes/_index.tsx
index b82efc4..2fcf1f2 100644
--- a/frontend/app/routes/_index.tsx
+++ b/frontend/app/routes/_index.tsx
@@ -1,10 +1,16 @@
-import type { MetaFunction } from "@remix-run/node";
+import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
import { Link } from "@remix-run/react";
+import { ensureUserNotLoggedIn } from "../.server/auth";
export const meta: MetaFunction = () => [
{ title: "iOSDC Japan 2024 Albatross.swift" },
];
+export async function loader({ request }: LoaderFunctionArgs) {
+ await ensureUserNotLoggedIn(request);
+ return null;
+}
+
export default function Index() {
return (
<div className="min-h-screen bg-gray-100 flex items-center justify-center">