diff --git a/memento-mobile/app/(tabs)/home.tsx b/memento-mobile/app/(tabs)/home.tsx
index ff96da0..7393f35 100644
--- a/memento-mobile/app/(tabs)/home.tsx
+++ b/memento-mobile/app/(tabs)/home.tsx
@@ -66,7 +66,7 @@ export default function HomeScreen() {
{greeting}{firstName ? `, ${firstName}` : ''}
{now.toLocaleDateString('fr-FR', { weekday: 'long', day: 'numeric', month: 'long' })}
- router.push('/(tabs)/search')} style={s.searchBtn}>
+ router.push({ pathname: '/(tabs)/search' })} style={s.searchBtn}>
@@ -79,13 +79,13 @@ export default function HomeScreen() {
Note du jour
- router.push('/(tabs)/search')} style={s.quickCard} activeOpacity={0.7}>
+ router.push({ pathname: '/(tabs)/search' })} style={s.quickCard} activeOpacity={0.7}>
Nouvelle note
- router.push('/(tabs)/search')} style={s.quickCard} activeOpacity={0.7}>
+ router.push({ pathname: '/(tabs)/search' })} style={s.quickCard} activeOpacity={0.7}>
diff --git a/memento-mobile/app/_layout.tsx b/memento-mobile/app/_layout.tsx
index b588547..c0752ee 100644
--- a/memento-mobile/app/_layout.tsx
+++ b/memento-mobile/app/_layout.tsx
@@ -19,8 +19,8 @@ export default function RootLayout() {
useEffect(() => {
if (loading) return
const inAuth = segments[0] === '(auth)'
- if (!user && !inAuth) router.replace('/(auth)/login')
- else if (user && inAuth) router.replace('/(tabs)/home')
+ if (!user && !inAuth) router.replace({ pathname: '/(auth)/login' })
+ else if (user && inAuth) router.replace({ pathname: '/(tabs)/home' })
}, [user, loading, segments])
if (loading) {