Files
frontend/app/index.tsx

13 lines
379 B
TypeScript
Raw Normal View History

import { Redirect } from 'expo-router';
import { useAuthStore } from '../src/stores';
import { hrefAuthWelcome, hrefHome } from '../src/navigation/hrefs';
export default function Index() {
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
if (isAuthenticated) {
return <Redirect href={hrefHome()} />;
}
return <Redirect href={hrefAuthWelcome()} />;
}