From 6fba9d1b836cf81e20d0a8b29c60d6ba8b8551e1 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Mon, 16 Dec 2024 12:26:09 +0000
Subject: fix(mobile): useLayoutEffect for navigator changes

---
 apps/mobile/app/dashboard/_layout.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'apps/mobile/app/dashboard/_layout.tsx')

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,
     });
-- 
cgit v1.2.3-70-g09d2

