12 lines
294 B
TypeScript
12 lines
294 B
TypeScript
|
|
import { Redirect } from 'expo-router';
|
||
|
|
|
||
|
|
import { useAuthStore } from '../src/stores';
|
||
|
|
|
||
|
|
export default function Index() {
|
||
|
|
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
|
||
|
|
if (isAuthenticated) {
|
||
|
|
return <Redirect href="/home" />;
|
||
|
|
}
|
||
|
|
return <Redirect href="/login" />;
|
||
|
|
}
|