-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathNotFoundScreen.tsx
More file actions
30 lines (25 loc) · 856 Bytes
/
NotFoundScreen.tsx
File metadata and controls
30 lines (25 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Box, Button, Text } from '@baca/design-system'
import { useScreenOptions, useTranslation } from '@baca/hooks'
import { router } from 'expo-router'
import { StyleSheet } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'
const navigateToLogin = () => {
router.navigate('/sign-in')
}
export const NotFoundScreen = (): JSX.Element => {
const { t } = useTranslation()
useScreenOptions({
title: t('navigation.screen_titles.not_found'),
})
return (
<SafeAreaView style={styles.safeArea}>
<Box alignItems="center" flexGrow={1} gap={8} p={8}>
<Text>{t('errors.screen_not_found')}</Text>
<Button maxW={360} onPress={navigateToLogin} title={t('common.continue')} w="full" />
</Box>
</SafeAreaView>
)
}
const styles = StyleSheet.create({
safeArea: { flexGrow: 1 },
})