import React from 'react'; import { Tabs, useRouter } from 'expo-router'; import { Anchor, Button, useTheme, XStack, YStack, Paragraph } from 'tamagui'; import { PersonStanding, MessageCircle, LogOut } from '@tamagui/lucide-icons'; import { useAuth } from '../../contexts/authcontext'; // Adjust path as needed export default function TabLayout() { const theme = useTheme(); const { logout, isLoggedIn } = useAuth(); const router = useRouter(); const navigateToLogin = () => { router.replace("/login"); }; const addFriendsNav = () => { router.replace("/addfriend") } const seePendingNav = () => { router.replace("/friendrequests") } const navigateToSignup = () => { router.replace("/signup"); }; const handleLogout = () => { logout(); }; return ( {/* Home Tab */} , headerRight: () => ( !isLoggedIn ? ( ) : ( ) ), }} /> {/* Conditional Rendering for Messages Tab */} {isLoggedIn ? ( , headerRight: () => ( ) }} /> ) : ( , }} /> )} {/* Conditional Rendering for Contacts Tab */} {isLoggedIn ? ( , }} /> ) : ( , }} /> )} ); }