Files
gh-christianlouis-docuelevate/mobile/App.tsx
T
copilot-swe-agent[bot] 971e578dd7 feat(mobile): update DocuElevate mobile app branding with original logo and UX
- Regenerate all app icons (icon.png, adaptive-icon.png, splash.png,
  favicon.png, notification-icon.png) using the DocuElevate folder+gear
  SVG logo on brand blue (#1e40af) background
- Add assets/logo.png (200×200 circular logo) for the login screen
- Update LoginScreen.tsx to display the DocuElevate logo image above
  the brand name text instead of plain text only
- Replace emoji tab bar icons (⬆️📄👤) with Ionicons vector icons
  (cloud-upload-outline, document-text-outline, person-circle-outline)
  from the already-installed @expo/vector-icons package

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

128 lines
3.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* App.tsx root component for the DocuElevate mobile app.
*
* Wraps the entire app in the AuthProvider and renders either the login
* screen (unauthenticated) or the main tab navigator (authenticated).
* Push notification registration is handled by the usePushNotifications hook.
*/
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { Ionicons } from "@expo/vector-icons";
import React from "react";
import { ActivityIndicator, StyleSheet, Text, View } from "react-native";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { AuthProvider, useAuth } from "./src/context/AuthContext";
import { usePushNotifications } from "./src/hooks/usePushNotifications";
import FilesScreen from "./src/screens/FilesScreen";
import LoginScreen from "./src/screens/LoginScreen";
import ProfileScreen from "./src/screens/ProfileScreen";
import UploadScreen from "./src/screens/UploadScreen";
const Tab = createBottomTabNavigator();
function TabNavigator() {
const { isAuthenticated } = useAuth();
usePushNotifications(isAuthenticated);
return (
<Tab.Navigator
screenOptions={{
tabBarActiveTintColor: "#1e40af",
tabBarInactiveTintColor: "#9ca3af",
tabBarStyle: {
borderTopColor: "#e5e7eb",
backgroundColor: "#ffffff",
},
headerStyle: {
backgroundColor: "#1e40af",
},
headerTintColor: "#ffffff",
headerTitleStyle: {
fontWeight: "700",
},
}}
>
<Tab.Screen
name="Upload"
component={UploadScreen}
options={{
title: "Upload",
tabBarLabel: "Upload",
tabBarIcon: ({ color, size }) => (
<Ionicons name="cloud-upload-outline" size={size} color={color} />
),
headerTitle: "DocuElevate",
}}
/>
<Tab.Screen
name="Files"
component={FilesScreen}
options={{
title: "Files",
tabBarLabel: "Files",
tabBarIcon: ({ color, size }) => (
<Ionicons name="document-text-outline" size={size} color={color} />
),
headerTitle: "My Documents",
}}
/>
<Tab.Screen
name="Profile"
component={ProfileScreen}
options={{
title: "Profile",
tabBarLabel: "Profile",
tabBarIcon: ({ color, size }) => (
<Ionicons name="person-circle-outline" size={size} color={color} />
),
headerTitle: "Profile",
}}
/>
</Tab.Navigator>
);
}
function AppContent() {
const { isLoading, isAuthenticated } = useAuth();
if (isLoading) {
return (
<View style={styles.loading}>
<ActivityIndicator size="large" color="#1e40af" />
<Text style={styles.loadingText}>Loading</Text>
</View>
);
}
return (
<NavigationContainer>
{isAuthenticated ? <TabNavigator /> : <LoginScreen />}
</NavigationContainer>
);
}
export default function App() {
return (
<SafeAreaProvider>
<AuthProvider>
<AppContent />
</AuthProvider>
</SafeAreaProvider>
);
}
const styles = StyleSheet.create({
loading: {
flex: 1,
alignItems: "center",
justifyContent: "center",
backgroundColor: "#f9fafb",
gap: 12,
},
loadingText: {
color: "#6b7280",
fontSize: 15,
},
});