From ee57d74765e644de49c02de1e817eee0c6ed81aa Mon Sep 17 00:00:00 2001 From: Hailey Date: Tue, 12 Mar 2024 09:46:25 -0700 Subject: Dedupe navigation events (push, navigate, pop, etc) (#3179) --- src/components/Lists.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/components/Lists.tsx') diff --git a/src/components/Lists.tsx b/src/components/Lists.tsx index 58aa74b38..bb0d24797 100644 --- a/src/components/Lists.tsx +++ b/src/components/Lists.tsx @@ -8,9 +8,8 @@ import {cleanError} from 'lib/strings/errors' import {Button} from '#/components/Button' import {Text} from '#/components/Typography' import {StackActions} from '@react-navigation/native' -import {useNavigation} from '@react-navigation/core' -import {NavigationProp} from 'lib/routes/types' import {router} from '#/routes' +import {useNavigationDeduped} from 'lib/hooks/useNavigationDeduped' export function ListFooter({ isFetching, @@ -142,7 +141,7 @@ export function ListMaybePlaceholder({ notFoundType?: 'page' | 'results' onRetry?: () => Promise }) { - const navigation = useNavigation() + const navigation = useNavigationDeduped() const t = useTheme() const {gtMobile, gtTablet} = useBreakpoints() -- cgit 1.4.1