Major refactoring: navigation does not break anymore. the user can now navigate between the tabs without loosing context
This commit is contained in:
parent
457b098883
commit
1beee68bff
23 changed files with 137 additions and 80 deletions
34
app/(tabs)/(home)/_layout.tsx
Normal file
34
app/(tabs)/(home)/_layout.tsx
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { Stack } from "expo-router";
|
||||
|
||||
import { View, Text } from 'react-native'
|
||||
import React from 'react'
|
||||
import { useTheme } from "../../contexts/ThemeContext";
|
||||
|
||||
|
||||
export default function _Layout() {
|
||||
const { colors } = useTheme();
|
||||
return (
|
||||
<Stack
|
||||
initialRouteName="index"
|
||||
screenOptions={{
|
||||
contentStyle: {
|
||||
backgroundColor:colors.containerColor,
|
||||
},
|
||||
headerStyle: {
|
||||
backgroundColor: colors.containerColor
|
||||
},
|
||||
headerTintColor: colors.primaryText
|
||||
|
||||
}}>
|
||||
<Stack.Screen name="index" options={{
|
||||
title: "test",
|
||||
headerShown: false,
|
||||
}}/>
|
||||
<Stack.Screen name="userSettings" options={{
|
||||
animation: "slide_from_left",
|
||||
title: "User Settings",
|
||||
headerShown: false,
|
||||
}}/>
|
||||
</Stack>
|
||||
)
|
||||
}
|
||||
Reference in a new issue