Front: Score View: Back Button On Error

This commit is contained in:
Arthur Jamet
2023-05-07 14:57:06 +01:00
parent d0166c6b27
commit 9f17cd9f83

View File

@@ -34,7 +34,13 @@ const ScoreView = ({ songId, route }: RouteProps<ScoreViewProps>) => {
}
const songScore = songHistoryQuery.data.find((history) => history.songID == songId);
if (!songScore) {
return <Center><Translate translationKey="unknownError"/></Center>;
return <Center>
<Translate translationKey="unknownError"/>
<TextButton
translate={{ translationKey: 'backBtn' }}
onPress={() => navigation.navigate('Home')}
/>
</Center>;
}
return <ScrollView p={8} contentContainerStyle={{ alignItems: 'center' }}>
<VStack width={{ base: '100%', lg: '50%' }} textAlign='center'>