Skip to content

Commit bcfdd9c

Browse files
Fix redundant condition in permissions tab press logic
Co-authored-by: digitalnomad91 <2067771+digitalnomad91@users.noreply.github.com>
1 parent 8d1f8fd commit bcfdd9c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/(tabs)/_layout.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ export default function TabLayout() {
5757
tabPress: (e: { preventDefault: () => void }) => {
5858
// If already on a permissions sub-page (not the index), navigate to permissions index
5959
const isOnPermissionsSubPage = pathname.startsWith('/permissions/') && pathname !== '/permissions';
60-
const isOnPermissionsIndex = pathname === '/permissions' || pathname === '/(tabs)/permissions';
61-
62-
if (isOnPermissionsSubPage || isOnPermissionsIndex) {
60+
61+
if (isOnPermissionsSubPage) {
6362
// Prevent default tab behavior
6463
e.preventDefault();
6564
// Navigate to permissions index, replacing the current route to reset the stack

0 commit comments

Comments
 (0)