Major refactoring: navigation does not break anymore. the user can now navigate between the tabs without loosing context

This commit is contained in:
Jakob Stornig 2024-01-20 11:54:25 +01:00
parent 457b098883
commit 1beee68bff
23 changed files with 137 additions and 80 deletions

View 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>
)
}