Week 9 More Issue Relating to Routes
Title : Issue
Author : Sampurna Adhikari
Issue 1
When a Food Donor logs in for that particular user browse food (home.js) and map(map.js) is optional and donot require to view these screens so for that to happen i created seperate tabs_donor and tabs_receiver and then on app/_layout.js a simple role check and redirecting to the respective page.
But the error is even if the login is successful the app wont redirect me to the main app.
Currently working on this issue.
few error logs
ERROR [Error: Screen names must be unique: index,GetStarted,Authentication,(tab_donor),(tab_receiver),ChatScreen,CheckoutScreen,createlistings,editlisting,editprofile,modal,(tab_donor),(tab_receiver)]
Code: _layout.js
147 | return (
148 | <StripeProvider publishableKey="pk_test_51SGb1FRhXrCJgpPwtDG4AG7bwo3wdLR06Se1kJwBfAKxgi6UKCZPHlw8b4ASB566csNplZSS8UBo5ltMx9E0oMUB00VNmnbncg">
> 149 | <Stack screenOptions={{ headerShown: false }}>
| ^
150 | <Stack.Screen name="index" options={{ headerShown: false }} />
151 | <Stack.Screen name="GetStarted" options={{ headerShown: false }} />
152 | <Stack.Screen name="Authentication" options={{ headerShown: false }} />
Call Stack
Android Bundled 499ms node_modules/expo-router/entry.js (1429 modules)
⚠️ WARNING: RNMapboxMapsDownloadToken is deprecated. Use RNMAPBOX_MAPS_DOWNLOAD_TOKEN environment variable instead.
⚠️ WARNING: This token will be part of your gradle.properties. Be careful about committing it to source control.
LOG Loading...
LOG Current user: undefined
LOG No user found, setting role to guest
LOG Current segments: []
LOG 👤 Current role: guest
LOG 📍 Current segments: []
LOG Current role: guest
LOG Current segments: ["GetStarted"]
LOG Current role: guest
LOG Current segments: ["Authentication", "Login"]
LOG Current role: guest.




Comments
Post a Comment