Moved later/gitgram-ai/gitgram/ to apps/ritgram/ (fresh history; full history stays in caelum0x/gitgram). AITimeMachine stays separate in later/gitgram-ai per the Rithub master plan. Logs, pid files and env files are ignored; GPL-3.0 mobile/proximity noted in THIRD_PARTY_NOTICES. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
32 lines
736 B
TypeScript
32 lines
736 B
TypeScript
import { useEffect, useState } from 'react';
|
|
import { Redirect } from 'expo-router';
|
|
import { useAuthStore } from '../store/authStore';
|
|
import SplashScreen from '../components/common/SplashScreen';
|
|
|
|
export default function Index() {
|
|
const { isAuthenticated, initialize } = useAuthStore();
|
|
const [showSplash, setShowSplash] = useState(true);
|
|
|
|
useEffect(() => {
|
|
initialize();
|
|
|
|
// Show splash screen for 2 seconds
|
|
const timer = setTimeout(() => {
|
|
setShowSplash(false);
|
|
}, 2000);
|
|
|
|
return () => clearTimeout(timer);
|
|
}, []);
|
|
|
|
if (showSplash) {
|
|
return <SplashScreen />;
|
|
}
|
|
|
|
if (isAuthenticated) {
|
|
return <Redirect href="/(tabs)/home" />;
|
|
}
|
|
|
|
return <Redirect href="/(auth)/login" />;
|
|
}
|
|
|