Skip to content

Commit 6694a45

Browse files
committed
fixed routing error where brought to home without tabs
1 parent 2b8354d commit 6694a45

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

KonditionExpo/app/_layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default function RootLayout() {
3535
<Stack.Screen name="workout" options={{ headerShown: false }} />
3636
<Stack.Screen name="notification" options={{ headerShown: false }} />
3737
<Stack.Screen name="profile" options={{ headerShown: false }} />
38-
<Stack.Screen name="home" options={{ headerShown: false }} />
3938
<Stack.Screen name="+not-found" />
4039
</Stack>
4140
</ProtectedRoute>

KonditionExpo/app/workout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const WorkoutScreen = () => {
126126

127127
useEffect(() => {
128128
if (!currentWorkout) {
129-
router.back();
129+
router.replace('/(tabs)');
130130
}
131131
}, [currentWorkout]);
132132

@@ -163,7 +163,7 @@ const WorkoutScreen = () => {
163163
const duration = Math.round((new Date().getTime() - startTime.getTime()) / 60000);
164164
const updatedWorkout = { ...currentWorkout, duration };
165165
endWorkout();
166-
router.replace('/home');
166+
router.replace('/(tabs)');
167167
},
168168
},
169169
]
@@ -177,7 +177,7 @@ const WorkoutScreen = () => {
177177
return (
178178
<SafeAreaView style={[styles.container, { backgroundColor: '#FFFFFF' }]}>
179179
<View style={styles.header}>
180-
<TouchableOpacity onPress={() => router.replace('/home')}>
180+
<TouchableOpacity onPress={() => router.replace('/(tabs)')}>
181181
<Text style={[styles.backButton, { color: '#70A1FF' }]}>← Exit</Text>
182182
</TouchableOpacity>
183183
<Text style={[styles.workoutTitle, { color: '#333' }]}>{currentWorkout.name}</Text>

0 commit comments

Comments
 (0)