Skip to content

Commit

Permalink
fix(banner-card): push instead of replace screen
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangvu12 committed Nov 21, 2023
1 parent b667f57 commit 65da2bb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/ui/banner-card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StackActions, useNavigation } from '@react-navigation/native';
import { useNavigation } from '@react-navigation/native';
import { LinearGradient } from 'expo-linear-gradient';
import { styled } from 'nativewind';
import React, { useCallback, useMemo } from 'react';
Expand Down Expand Up @@ -105,11 +105,9 @@ const BannerItem = React.memo(
const handlePress = () => {
if (!media?.id) return console.warn('No media id');

navigation.dispatch(
StackActions.replace('AnimeDetails', {
mediaId: media.id,
})
);
navigation.navigate('AnimeDetails', {
mediaId: media.id,
});
};

return (
Expand Down

0 comments on commit 65da2bb

Please sign in to comment.