mobile: fix typed routes - router.push/replace avec objet pathname
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user