Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(mobile): delete hack for hiding parent's header

Mohamed Bassem3f45d9e19052
diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx
index b1ecc133..a68fec53 100644
--- a/apps/mobile/app/_layout.tsx
+++ b/apps/mobile/app/_layout.tsx
@@ -67,6 +67,12 @@ export default function RootLayout() {
headerShadowVisible: false,
}}
>
+ <Stack.Screen
+ name="dashboard"
+ options={{
+ headerShown: false,
+ }}
+ />
<Stack.Screen
name="index"
options={{
diff --git a/apps/mobile/app/dashboard/_layout.tsx b/apps/mobile/app/dashboard/_layout.tsx
index f8258f54..91a8646d 100644
--- a/apps/mobile/app/dashboard/_layout.tsx
+++ b/apps/mobile/app/dashboard/_layout.tsx
@@ -1,7 +1,7 @@
import type { AppStateStatus } from "react-native";
-import { useEffect, useLayoutEffect } from "react";
+import { useEffect } from "react";
import { AppState, Platform } from "react-native";
-import { useNavigation, useRouter } from "expo-router";
+import { useRouter } from "expo-router";
import { Stack } from "expo-router/stack";
import { StyledStack } from "@/components/navigation/stack";
import { useIsLoggedIn } from "@/lib/session";
@@ -16,14 +16,6 @@ function onAppStateChange(status: AppStateStatus) {
export default function Dashboard() {
const router = useRouter();
- const navigation = useNavigation();
- // Hide the header on the parent screen
- useLayoutEffect(() => {
- navigation.setOptions({
- headerShown: false,
- });
- }, [navigation]);
-
const isLoggedIn = useIsLoggedIn();
useEffect(() => {
if (isLoggedIn !== undefined && !isLoggedIn) {