2026-03-24 14:21:31 +08:00
|
|
|
import { Redirect } from 'expo-router';
|
|
|
|
|
|
|
|
|
|
import { useAuthStore } from '../src/stores';
|
2026-06-12 23:42:09 +08:00
|
|
|
import { hrefAuthWelcome, hrefHome } from '../src/navigation/hrefs';
|
2026-03-24 14:21:31 +08:00
|
|
|
|
|
|
|
|
export default function Index() {
|
|
|
|
|
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
|
|
|
|
|
if (isAuthenticated) {
|
2026-06-12 23:42:09 +08:00
|
|
|
return <Redirect href={hrefHome()} />;
|
2026-03-24 14:21:31 +08:00
|
|
|
}
|
2026-06-12 23:42:09 +08:00
|
|
|
return <Redirect href={hrefAuthWelcome()} />;
|
2026-03-24 14:21:31 +08:00
|
|
|
}
|