mobile: fix typed routes - router.push/replace avec objet pathname
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m5s
CI / Deploy production (on server) (push) Has been skipped

typedRoutes=true dans app.json interdit les string literals
Tous les router.push/replace convertis en { pathname } object

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Antigravity
2026-05-29 17:18:45 +00:00
parent 12d1e3dfdd
commit e7290d6f9c
2 changed files with 5 additions and 5 deletions

View File

@@ -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) {