Front: If resource is not found, redirect to Error View

This commit is contained in:
Arthur Jamet
2023-06-21 17:16:22 +01:00
committed by Clément Le Bihan
parent 45595408fe
commit 3e84605c59
7 changed files with 53 additions and 7 deletions
+19
View File
@@ -0,0 +1,19 @@
import { Button, Center, VStack } from 'native-base';
import Translate from '../components/Translate';
import { useNavigation } from '../Navigation';
const ErrorView = () => {
const navigation = useNavigation();
return (
<Center style={{ flexGrow: 1 }}>
<VStack space={3} alignItems="center">
<Translate translationKey="anErrorOccured" />
<Button onPress={() => navigation.navigate('Home')}>
<Translate translationKey="goBackHome" />
</Button>
</VStack>
</Center>
);
};
export default ErrorView;