import React from 'react'; import { Tabs, Slot, useRouter } from 'expo-router'; import { Anchor, Button, useTheme, XStack, YStack } from 'tamagui'; import { PersonStanding, MessageCircle, LogOut, ArrowLeft, ArrowLeftFromLine } 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 redirect = true const router = useRouter() const goback = () => { router.replace("/") } const navigateToLogin = () => { router.replace("/login") } const navigateToSignup = () => { router.replace("/signup") } const handleLogout = () => { logout(); }; return ( {/* Home Tab */} , tabBarIcon: ({ color }) => , headerRight: () => ( !isLoggedIn ? ( ):() // ), }} /> , tabBarIcon: ({ color }) => , headerRight: () => ( !isLoggedIn ? ( ) : () // ), }}> {/* Conditional Rendering for Messages Tab */} {isLoggedIn ? ( , }} /> ) : ( , }} /> )} ); }