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/archive.tsx | |
| parent | deadcb992c0478d22e6c2b85f60167b6ded948a5 (diff) | |
| download | karakeep-6fba9d1b836cf81e20d0a8b29c60d6ba8b8551e1.tar.zst | |
fix(mobile): useLayoutEffect for navigator changes
Diffstat (limited to 'apps/mobile/app/dashboard/archive.tsx')
| -rw-r--r-- | apps/mobile/app/dashboard/archive.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/mobile/app/dashboard/archive.tsx b/apps/mobile/app/dashboard/archive.tsx index b4cc3a66..b02088c8 100644 --- a/apps/mobile/app/dashboard/archive.tsx +++ b/apps/mobile/app/dashboard/archive.tsx @@ -1,13 +1,16 @@ +import { useLayoutEffect } from "react"; import { useNavigation } from "expo-router"; import UpdatingBookmarkList from "@/components/bookmarks/UpdatingBookmarkList"; import CustomSafeAreaView from "@/components/ui/CustomSafeAreaView"; export default function Archive() { const navigator = useNavigation(); - navigator.setOptions({ - headerTitle: "🗄️ Archive", - headerLargeTitle: true, - }); + useLayoutEffect(() => { + navigator.setOptions({ + headerTitle: "🗄️ Archive", + headerLargeTitle: true, + }); + }, [navigator]); return ( <CustomSafeAreaView> <UpdatingBookmarkList query={{ archived: true }} /> |
