/** * Tab navigator layout for authenticated users. * * Registers three tabs: Upload (default), Files, and Profile. * Push notifications are initialised here so they activate as soon as the * user enters the authenticated area. */ import { Tabs } from "expo-router"; import { Ionicons } from "@expo/vector-icons"; import React from "react"; import { usePushNotifications } from "../../src/hooks/usePushNotifications"; import { useAuth } from "../../src/context/AuthContext"; import { useLocale, t } from "../../src/i18n"; export default function TabLayout() { const { isAuthenticated } = useAuth(); usePushNotifications(isAuthenticated); // Subscribe to language changes so tab labels re-render when the language // is switched. The `lang` variable is intentionally unused – its only // purpose is to make this component a consumer of LocaleContext. useLocale(); return ( ( ), headerTitle: "DocuElevate", }} /> ( ), headerTitle: t("files.title"), }} /> ( ), headerTitle: t("tabs.profile"), }} /> {/* File detail screen – hidden from tab bar, accessed via navigation */} ); }