mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-08 07:28:37 +08:00
42 lines
1021 B
TypeScript
42 lines
1021 B
TypeScript
|
|
import { Tabs } from 'expo-router';
|
||
|
|
import { Ionicons } from '@expo/vector-icons';
|
||
|
|
import { StatusBar } from 'expo-status-bar';
|
||
|
|
import { useEffect } from 'react';
|
||
|
|
import { useAuthStore } from '../store/authStore';
|
||
|
|
|
||
|
|
export default function RootLayout() {
|
||
|
|
const restore = useAuthStore(s => s.restore);
|
||
|
|
|
||
|
|
useEffect(() => {
|
||
|
|
restore();
|
||
|
|
}, []);
|
||
|
|
|
||
|
|
return (
|
||
|
|
<>
|
||
|
|
<StatusBar style="dark" />
|
||
|
|
<Tabs
|
||
|
|
screenOptions={{
|
||
|
|
tabBarActiveTintColor: '#00AEEC',
|
||
|
|
tabBarInactiveTintColor: '#999',
|
||
|
|
tabBarStyle: { borderTopColor: '#eee' },
|
||
|
|
headerShown: false,
|
||
|
|
}}
|
||
|
|
>
|
||
|
|
<Tabs.Screen
|
||
|
|
name="index"
|
||
|
|
options={{
|
||
|
|
title: '首页',
|
||
|
|
tabBarIcon: ({ color, size }: { color: string; size: number }) => (
|
||
|
|
<Ionicons name="home" size={size} color={color} />
|
||
|
|
),
|
||
|
|
}}
|
||
|
|
/>
|
||
|
|
<Tabs.Screen
|
||
|
|
name="video"
|
||
|
|
options={{ href: null }}
|
||
|
|
/>
|
||
|
|
</Tabs>
|
||
|
|
</>
|
||
|
|
);
|
||
|
|
}
|