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';
|
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 (
|
2025-02-24 22:27:01 -05:00
|
|
|
<Stack
|
|
|
|
screenOptions={{
|
|
|
|
headerShown: false,
|
|
|
|
contentStyle: {
|
|
|
|
backgroundColor: theme.colors.background
|
|
|
|
},
|
|
|
|
presentation: 'modal', // Make all screens in this group modal by default
|
|
|
|
animation: 'slide_from_bottom',
|
|
|
|
gestureEnabled: true, // Allow gesture to dismiss
|
|
|
|
gestureDirection: 'vertical', // Swipe down to dismiss
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Stack.Screen
|
|
|
|
name="create"
|
|
|
|
options={{
|
|
|
|
// Modal presentation for create screen
|
|
|
|
presentation: 'modal',
|
|
|
|
animation: 'slide_from_bottom',
|
|
|
|
gestureEnabled: true,
|
|
|
|
gestureDirection: 'vertical',
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name="template-select"
|
|
|
|
options={{
|
|
|
|
presentation: 'modal',
|
|
|
|
animation: 'slide_from_bottom',
|
|
|
|
gestureEnabled: true,
|
|
|
|
}}
|
|
|
|
/>
|
2025-02-09 20:38:38 -05:00
|
|
|
<Stack.Screen
|
2025-02-24 22:27:01 -05:00
|
|
|
name="add-exercises"
|
2025-02-09 20:38:38 -05:00
|
|
|
options={{
|
2025-02-24 22:27:01 -05:00
|
|
|
presentation: 'modal',
|
|
|
|
animation: 'slide_from_bottom',
|
|
|
|
gestureEnabled: true,
|
2025-02-09 20:38:38 -05:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</Stack>
|
2025-02-24 22:27:01 -05:00
|
|
|
)
|
2025-02-09 20:38:38 -05:00
|
|
|
}
|