From beb76f662313b61ea10367d5acb75763ddbed737 Mon Sep 17 00:00:00 2001 From: Ben Goldberg Date: Fri, 1 Dec 2023 14:59:11 -0800 Subject: [PATCH] remove obsolete useFocusEffect --- .../points/content/PlaceholderContent.tsx | 1 - src/screens/points/content/PointsContent.tsx | 21 ++----------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/screens/points/content/PlaceholderContent.tsx b/src/screens/points/content/PlaceholderContent.tsx index 4b5dfd585dd..26ea3cbcba8 100644 --- a/src/screens/points/content/PlaceholderContent.tsx +++ b/src/screens/points/content/PlaceholderContent.tsx @@ -16,7 +16,6 @@ import { IS_TEST } from '@/env'; import { useAccountProfile, useDimensions } from '@/hooks'; import { useTheme } from '@/theme'; import { FloatingEmojisTapper } from '@/components/floating-emojis'; -import { Page } from '@/components/layout'; const fallConfig = { duration: 2000, diff --git a/src/screens/points/content/PointsContent.tsx b/src/screens/points/content/PointsContent.tsx index 27ef05277db..db7df20e382 100644 --- a/src/screens/points/content/PointsContent.tsx +++ b/src/screens/points/content/PointsContent.tsx @@ -1,5 +1,5 @@ -import React, { useCallback } from 'react'; -import { BackHandler, Image, RefreshControl } from 'react-native'; +import React from 'react'; +import { Image, RefreshControl } from 'react-native'; import { FloatingEmojis } from '@/components/floating-emojis'; import Routes from '@/navigation/routesNames'; import { useNavigation } from '@/navigation'; @@ -351,7 +351,6 @@ export default function PointsContent() { const { data, isFetching, dataUpdatedAt } = usePoints({ walletAddress: accountAddress, }); - const { navigate } = useNavigation(); const labelSecondary = useForegroundColor('labelSecondary'); const pink = useForegroundColor('pink'); @@ -361,22 +360,6 @@ export default function PointsContent() { addressCopiedToastAtom ); - useFocusEffect( - useCallback(() => { - const backAction = () => { - navigate(Routes.WALLET_SCREEN); - return true; - }; - - const backHandler = BackHandler.addEventListener( - 'hardwareBackPress', - backAction - ); - - return () => backHandler.remove(); - }, [navigate]) - ); - const onPressCopy = React.useCallback( (onNewEmoji: () => void) => { if (!isToastActive) {