import { Tabs } from "expo-router"; import { Ionicons } from "@expo/vector-icons"; import { Button, Alert } from "react-native"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { useRouter } from "expo-router"; export default function TabsLayout() { const router = useRouter(); const handleLogout = async () => { Alert.alert("Đăng xuất", "Bạn có chắc muốn đăng xuất?", [ { text: "Hủy", style: "cancel", }, { text: "Đăng xuất", style: "destructive", onPress: async () => { await AsyncStorage.removeItem("authToken"); router.replace("/"); // quay về màn hình đăng nhập }, }, ]); }; return ( , }} /> , }} /> , headerRight: () =>