kintex/mobile/app/index.tsx
zio 490b723a45 chore(mobile): v0.2.0 source snapshot for reproducibility
- app.json: version 0.2.0 / versionCode 2, drop expo-screen-capture plugin
- add lib/i18n (ko/en/ja/zh), lib/roleTrack, LanguageContext + LanguageSelector
- profile/security hardening across screens (login/register/forgot/profile/tabs)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 00:29:38 +09:00

33 lines
923 B
TypeScript

/*
* 진입점 — 토큰 복원 대기 후 인증 상태에 따라 로그인/탭 홈으로 분기.
*/
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 (
<View style={styles.center}>
<ActivityIndicator color={colors.primary600} size="large" />
</View>
);
}
// 인증됨 → 역할별 랜딩(지속된 값, 없으면 탭 홈) / 미인증 → 로그인.
return <Redirect href={token ? ((landingPath ?? '/(tabs)') as never) : '/login'} />;
}
const styles = StyleSheet.create({
center: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: colors.neutral050,
},
});