Files
gh-christianlouis-docuelevate/mobile/app/(tabs)/_layout.tsx
T
copilot-swe-agent[bot] 82d90b48e2 fix(mobile): correct asset logo path depth and add expo-router app/ routes for web support
- Fix fatal crash: require('../../../assets/logo.png') in LoginScreen and
  WelcomeScreen resolved 3 levels above mobile/src/screens/ — outside the
  mobile/ directory. Changed to ../../assets/logo.png which correctly
  resolves to the existing mobile/assets/logo.png.
- Add expo-router app/ directory (root cause of missing welcome screen and
  web support): app/_layout.tsx, (auth)/, (tabs)/ with all route files
- Add WelcomeScreen.tsx: branded intro screen with feature highlights
- Update LoginScreen/WelcomeScreen to use useRouter() (expo-router style)
- Add react-native-web ~0.20.0 and react-dom 19.2.4 for web channel
- Add expo-device ~7.0.3 (was imported but missing from package.json)
- Remove android.googleServicesFile from app.json (file is gitignored;
  README documents how to restore it for Android FCM builds)
- Add web.bundler: metro and web.output: single to app.json
- Fix aria-hidden to explicit boolean value in WelcomeScreen

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 16:02:02 +00:00

73 lines
1.9 KiB
TypeScript

/**
* 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";
export default function TabLayout() {
const { isAuthenticated } = useAuth();
usePushNotifications(isAuthenticated);
return (
<Tabs
screenOptions={{
tabBarActiveTintColor: "#1e40af",
tabBarInactiveTintColor: "#9ca3af",
tabBarStyle: {
borderTopColor: "#e5e7eb",
backgroundColor: "#ffffff",
},
headerStyle: {
backgroundColor: "#1e40af",
},
headerTintColor: "#ffffff",
headerTitleStyle: {
fontWeight: "700",
},
}}
>
<Tabs.Screen
name="index"
options={{
title: "Upload",
tabBarLabel: "Upload",
tabBarIcon: ({ color, size }) => (
<Ionicons name="cloud-upload-outline" size={size} color={color} />
),
headerTitle: "DocuElevate",
}}
/>
<Tabs.Screen
name="files"
options={{
title: "Files",
tabBarLabel: "Files",
tabBarIcon: ({ color, size }) => (
<Ionicons name="document-text-outline" size={size} color={color} />
),
headerTitle: "My Documents",
}}
/>
<Tabs.Screen
name="profile"
options={{
title: "Profile",
tabBarLabel: "Profile",
tabBarIcon: ({ color, size }) => (
<Ionicons name="person-circle-outline" size={size} color={color} />
),
headerTitle: "Profile",
}}
/>
</Tabs>
);
}