Files
JKVideo/app/_layout.tsx

36 lines
969 B
TypeScript
Raw Normal View History

2026-03-10 19:04:18 +08:00
import { Stack } from 'expo-router';
import { StatusBar } from 'expo-status-bar';
2026-03-06 12:58:41 +08:00
import { SafeAreaProvider } from 'react-native-safe-area-context';
2026-03-10 19:04:18 +08:00
import { View } from 'react-native';
import { useEffect } from 'react';
import { useAuthStore } from '../store/authStore';
2026-03-10 19:04:18 +08:00
import { MiniPlayer } from '../components/MiniPlayer';
export default function RootLayout() {
const restore = useAuthStore(s => s.restore);
useEffect(() => {
restore();
}, []);
return (
2026-03-06 12:58:41 +08:00
<SafeAreaProvider>
<StatusBar style="dark" />
2026-03-10 19:04:18 +08:00
<View style={{ flex: 1 }}>
2026-03-13 21:52:09 +08:00
<Stack screenOptions={{ headerShown: false }}>
<Stack.Screen name="index" />
<Stack.Screen
name="video"
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
</Stack>
2026-03-10 19:04:18 +08:00
<MiniPlayer />
</View>
2026-03-06 12:58:41 +08:00
</SafeAreaProvider>
);
}