diff --git a/app/mobile/src/app/_layout.tsx b/app/mobile/src/app/_layout.tsx
index a4f5058..53ab67f 100644
--- a/app/mobile/src/app/_layout.tsx
+++ b/app/mobile/src/app/_layout.tsx
@@ -19,10 +19,11 @@ function AuthGate() {
useEffect(() => {
if (!ready) return;
const inLogin = segments[0] === 'login';
- if (!api && !inLogin) router.replace('/login');
- else if (api && inLogin) router.replace('/');
+ if (api && inLogin) router.replace('/');
}, [ready, api, segments, router]);
+ if (!ready) return null;
+
return (
+
+
+
+
+
+
-
-
-
-
);
}
diff --git a/app/mobile/src/app/index.tsx b/app/mobile/src/app/index.tsx
index 3861ed0..21eb8bc 100644
--- a/app/mobile/src/app/index.tsx
+++ b/app/mobile/src/app/index.tsx
@@ -1,5 +1,8 @@
import { Redirect } from 'expo-router';
+import { useSession } from '../session';
export default function Index() {
- return ;
+ const { ready, api } = useSession();
+ if (!ready) return null;
+ return ;
}