/*
* 진입점 — 토큰 복원 대기 후 인증 상태에 따라 로그인/탭 홈으로 분기.
*/
import { Redirect } from 'expo-router';
import React from 'react';
import { ActivityIndicator, StyleSheet, View } from 'react-native';
import { useAuth } from '../context/AuthContext';
import { colors } from '../theme';
export default function Index() {
const { ready, token, landingPath } = useAuth();
if (!ready) {
return (
);
}
// 인증됨 → 역할별 랜딩(지속된 값, 없으면 탭 홈) / 미인증 → 로그인.
return ;
}
const styles = StyleSheet.create({
center: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: colors.neutral050,
},
});