import { useEffect } from 'react'; import { View, StyleSheet, ActivityIndicator } from 'react-native'; import { Tabs, router } from 'expo-router'; import { BlurView } from 'expo-blur'; import Svg, { Path, Circle, Line, Polyline } from 'react-native-svg'; import { Colors, TAB_BAR_HEIGHT } from '../../constants/theme'; import { useAuth, usePlayer } from '../../store'; import MiniPlayer from '../../components/MiniPlayer'; import Player from '../../components/Player'; export default function TabsLayout() { const { user, ready } = useAuth(); const { expanded } = usePlayer(); useEffect(() => { if (ready && !user) { router.replace('/auth'); } }, [user, ready]); if (!ready) return ( ); if (!user) return null; return ( ( ), tabBarActiveTintColor: Colors.green, tabBarInactiveTintColor: Colors.text3, tabBarLabelStyle: { fontSize: 10, fontWeight: '600', marginBottom: 4 }, tabBarItemStyle: { paddingTop: 8 }, }} > }} /> }} /> }} /> }} /> {expanded && } ); } function HomeIcon({ color }: { color: string }) { return ( ); } function LibIcon({ color }: { color: string }) { return ( ); } function SearchIcon({ color }: { color: string }) { return ( ); } function ProfileIcon({ color }: { color: string }) { return ( ); } const styles = StyleSheet.create({ tabBar: { position: 'absolute', borderTopWidth: 0, backgroundColor: 'transparent', elevation: 0, height: TAB_BAR_HEIGHT, }, });