POWR/app/(workout)/_layout.tsx

69 lines
1.8 KiB
TypeScript
Raw Permalink Normal View History

2025-02-09 20:38:38 -05:00
// app/(workout)/_layout.tsx
2025-02-24 22:27:01 -05:00
import React from 'react'
import { Stack } from 'expo-router'
import { useTheme } from '@react-navigation/native';
import { Platform } from 'react-native';
import { StatusBar } from 'expo-status-bar';
2025-02-09 20:38:38 -05:00
export default function WorkoutLayout() {
2025-02-24 22:27:01 -05:00
const theme = useTheme();
2025-02-09 20:38:38 -05:00
return (
<>
<StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
<Stack
screenOptions={{
headerShown: false,
contentStyle: {
backgroundColor: theme.colors.background
},
// Use standard card presentation for all screens
presentation: 'card',
// Standard animation
animation: 'default',
// Enable standard left-edge back gesture
2025-02-24 22:27:01 -05:00
gestureEnabled: true,
gestureDirection: 'horizontal',
2025-02-24 22:27:01 -05:00
}}
>
<Stack.Screen
name="create"
options={{
presentation: 'card',
animation: 'default',
gestureEnabled: true,
gestureDirection: 'horizontal',
}}
/>
<Stack.Screen
name="add-exercises"
options={{
presentation: 'card',
animation: 'default',
gestureEnabled: true,
gestureDirection: 'horizontal',
}}
/>
<Stack.Screen
name="template-select"
options={{
presentation: 'card',
animation: 'default',
gestureEnabled: true,
gestureDirection: 'horizontal',
}}
/>
<Stack.Screen
name="workout/[id]"
options={{
presentation: 'card',
animation: 'default',
gestureEnabled: true,
gestureDirection: 'horizontal',
}}
/>
</Stack>
</>
);
}