faa1e82301
Package mobile/ (Expo SDK 56, expo-router) réutilisant l'API backend : Login (mdp+TOTP), Chat (+ TTS expo-speech), Review (approuver/refuser). JWT en expo-secure-store, thème dark HUD, EXPO_PUBLIC_API_BASE. typecheck vert. STT mobile reporté (lib native), TTS OK. Versions gérées par Expo. Palier de risque : reversible (client mobile, API commune). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
import { Tabs, Redirect } from "expo-router";
|
|
import { Ionicons } from "@expo/vector-icons";
|
|
import { useAuth } from "@/auth";
|
|
import { C } from "@/theme";
|
|
|
|
export default function TabsLayout() {
|
|
const { token, ready } = useAuth();
|
|
if (ready && !token) return <Redirect href="/login" />;
|
|
|
|
return (
|
|
<Tabs
|
|
screenOptions={{
|
|
headerStyle: { backgroundColor: C.surface },
|
|
headerTintColor: C.accent,
|
|
tabBarStyle: { backgroundColor: C.surface, borderTopColor: C.border },
|
|
tabBarActiveTintColor: C.accent,
|
|
tabBarInactiveTintColor: C.muted,
|
|
}}
|
|
>
|
|
<Tabs.Screen
|
|
name="chat"
|
|
options={{
|
|
title: "Chat",
|
|
tabBarIcon: ({ color, size }) => <Ionicons name="chatbubble-ellipses" color={color} size={size} />,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="review"
|
|
options={{
|
|
title: "Review",
|
|
tabBarIcon: ({ color, size }) => <Ionicons name="shield-checkmark" color={color} size={size} />,
|
|
}}
|
|
/>
|
|
</Tabs>
|
|
);
|
|
}
|