Skip to content

Commit

Permalink
Clean up navigation listener
Browse files Browse the repository at this point in the history
  • Loading branch information
rayane-djouah committed Jan 7, 2025
1 parent 0d263c3 commit 0a7f69c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pages/Search/SearchTypeMenuNarrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function SearchTypeMenuNarrow({typeMenuItems, activeItemIndex, queryJSON, title,

useEffect(() => {
Navigation.isNavigationReady().then(() => {
removeListener.current?.();
const initialRoute = navigationRef.current?.getCurrentRoute();
setCurrentScreen(initialRoute?.name);
removeListener.current = navigationRef.current?.addListener('state', (event) => {
Expand Down

0 comments on commit 0a7f69c

Please sign in to comment.