Skip to content

Commit

Permalink
remove obsolete useFocusEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
benisgold committed Dec 1, 2023
1 parent 99a70ec commit beb76f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/screens/points/content/PlaceholderContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
21 changes: 2 additions & 19 deletions src/screens/points/content/PointsContent.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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');
Expand All @@ -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) {
Expand Down

0 comments on commit beb76f6

Please sign in to comment.