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/(tabs)/_layout.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/apps/mobile/app/dashboard/(tabs)/_layout.tsx b/apps/mobile/app/dashboard/(tabs)/_layout.tsx
index 4e403a99..f1d90ee4 100644
--- a/apps/mobile/app/dashboard/(tabs)/_layout.tsx
+++ b/apps/mobile/app/dashboard/(tabs)/_layout.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect } from "react";
+import React, { useLayoutEffect } from "react";
 import { Tabs, useNavigation } from "expo-router";
 import { StyledTabs } from "@/components/navigation/tabs";
 import { ClipboardList, Home, Settings } from "lucide-react-native";
@@ -6,7 +6,7 @@ import { ClipboardList, Home, Settings } from "lucide-react-native";
 export default function TabLayout() {
   const navigation = useNavigation();
   // Hide the header on the parent screen
-  useEffect(() => {
+  useLayoutEffect(() => {
     navigation.setOptions({
       headerShown: false,
     });
-- 
cgit v1.2.3-70-g09d2

