diff --git a/front/components/ScoreModal.tsx b/front/components/ScoreModal.tsx index 4b30db6..2d1e1db 100644 --- a/front/components/ScoreModal.tsx +++ b/front/components/ScoreModal.tsx @@ -3,6 +3,7 @@ import ButtonBase from './UI/ButtonBase'; import { Translate, TranslationKey, translate } from '../i18n/i18n'; import { Play, Star1 } from 'iconsax-react-native'; import { useNavigation } from '../Navigation'; +import { StackActions } from '@react-navigation/native'; type ScoreModalProps = { songId: number; @@ -61,7 +62,7 @@ const ScoreModal = (props: ScoreModalProps) => { /> ))} - {score}% + {Math.max(score, 0)}% {props.precision}% @@ -95,7 +96,9 @@ const ScoreModal = (props: ScoreModalProps) => { icon={Play} type="outlined" title={translate('playAgain')} - onPress={() => navigation.navigate('Play', { songId: props.songId })} + onPress={() => + navigation.dispatch(StackActions.replace('Play', { songId: props.songId })) + } />