diff options
| author | MohamedBassem <me@mbassem.com> | 2024-12-16 12:26:09 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-12-16 12:26:09 +0000 |
| commit | 6fba9d1b836cf81e20d0a8b29c60d6ba8b8551e1 (patch) | |
| tree | db79768b43628c9a67148ea1a93a964b49bcc71c /apps/mobile/app/dashboard/_layout.tsx | |
| parent | deadcb992c0478d22e6c2b85f60167b6ded948a5 (diff) | |
| download | karakeep-6fba9d1b836cf81e20d0a8b29c60d6ba8b8551e1.tar.zst | |
fix(mobile): useLayoutEffect for navigator changes
Diffstat (limited to 'apps/mobile/app/dashboard/_layout.tsx')
| -rw-r--r-- | apps/mobile/app/dashboard/_layout.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/mobile/app/dashboard/_layout.tsx b/apps/mobile/app/dashboard/_layout.tsx index d6e5ab7c..e9c28c90 100644 --- a/apps/mobile/app/dashboard/_layout.tsx +++ b/apps/mobile/app/dashboard/_layout.tsx @@ -1,5 +1,5 @@ import type { AppStateStatus } from "react-native"; -import { useEffect } from "react"; +import { useEffect, useLayoutEffect } from "react"; import { AppState, Platform } from "react-native"; import { useNavigation, useRouter } from "expo-router"; import { Stack } from "expo-router/stack"; @@ -18,7 +18,7 @@ export default function Dashboard() { const navigation = useNavigation(); // Hide the header on the parent screen - useEffect(() => { + useLayoutEffect(() => { navigation.setOptions({ headerShown: false, }); |
