Replies: 1 comment
-
current workaround is manually check the screen name, changing const len = segments.length;
const inAuthGroup = Protected.has(segments[len - 1]); where const Protected = new Set(["tab2", "tab3"); However this won't work for navigation like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just said that I have a provider for auth base with this reference
but I change this
to
So the shared route
"(auth)"
can be placed on any layer.Thus, I want to implement Authenticated Tab Partially. Like this
I expect to redirect user that not already login based on
inAuthGroup
variable. I only want to protect only tab 2 and tab 3 and keep the tabs together on bottom navigation tab.So I apply write inside
app/(tabs)/_layout.tsx
:But both of
tab2
andtab3
is not detected. Is there any workaround to achieve this?Beta Was this translation helpful? Give feedback.
All reactions