fix (tabs)

This commit is contained in:
trochas
2025-10-10 09:23:00 +02:00
parent e0c1fe8673
commit 697b03a0eb
3 changed files with 25 additions and 4 deletions

View File

@@ -25,6 +25,18 @@ In the output, you'll find options to open the app in a
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
## Screen
```mermaid
Login --> Accuil
Accuil --> Profil
Accuil ->
```
## Get a fresh project ## Get a fresh project
When you're ready, run: When you're ready, run:

View File

@@ -1,16 +1,22 @@
import { Tabs } from 'expo-router'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { } from 'expo-router';
import React from 'react'; import React from 'react';
import { HapticTab } from '@/components/haptic-tab'; import { HapticTab } from '@/components/haptic-tab';
import { IconSymbol } from '@/components/ui/icon-symbol'; import { IconSymbol } from '@/components/ui/icon-symbol';
import { Colors } from '@/constants/theme'; import { Colors } from '@/constants/theme';
import { useColorScheme } from '@/hooks/use-color-scheme'; import { useColorScheme } from '@/hooks/use-color-scheme';
import TabTwoScreen from './explore';
import HomeScreen from './index';
const Tabs = createBottomTabNavigator();
export default function TabLayout() { export default function TabLayout() {
const colorScheme = useColorScheme(); const colorScheme = useColorScheme();
return ( return (
<Tabs <Tabs.Navigator
screenOptions={{ screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint, tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
headerShown: false, headerShown: false,
@@ -18,6 +24,7 @@ export default function TabLayout() {
}}> }}>
<Tabs.Screen <Tabs.Screen
name="index" name="index"
component={HomeScreen}
options={{ options={{
title: 'Home', title: 'Home',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />, tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
@@ -29,7 +36,9 @@ export default function TabLayout() {
title: 'Explore', title: 'Explore',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />, tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
}} }}
/> >
</Tabs> {() => <TabTwoScreen/>}
</Tabs.Screen>
</Tabs.Navigator>
); );
} }

0
app/(tabs)/login.tsx Normal file
View File