Get started on stack navigation for settings page
This commit is contained in:
39
app/(tabs)/settings/_layout.tsx
Normal file
39
app/(tabs)/settings/_layout.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Stack } from 'expo-router';
|
||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
import { Colors } from '@/constants/Colors';
|
||||
|
||||
export default function SettingsLayout() {
|
||||
const scheme = useColorScheme() ?? 'dark';
|
||||
|
||||
return (
|
||||
<Stack
|
||||
screenOptions={{
|
||||
headerStyle: {
|
||||
backgroundColor: Colors[scheme].background,
|
||||
},
|
||||
headerTintColor: Colors[scheme].text,
|
||||
headerTitleStyle: {
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
// This gives the iOS-style slide-in animation
|
||||
animation: 'slide_from_right',
|
||||
}}
|
||||
>
|
||||
<Stack.Screen
|
||||
name="index"
|
||||
options={{
|
||||
title: "Settings",
|
||||
headerShown: false,
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="profile"
|
||||
options={{
|
||||
title: "Profile",
|
||||
headerShown: true,
|
||||
}}
|
||||
/>
|
||||
{/* Add more screens as needed */}
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user