* Extended functionalities
* Added different UIs
This commit is contained in:
47
meal-plan-frontend-mobile/app/+not-found.tsx
Normal file
47
meal-plan-frontend-mobile/app/+not-found.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import { Link, Stack } from 'expo-router';
|
||||
import { StyleSheet, Text, View } from 'react-native';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useAppearance } from '@/src/context/AppearanceContext';
|
||||
|
||||
export default function NotFoundScreen() {
|
||||
const { t } = useTranslation();
|
||||
const { colors } = useAppearance();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack.Screen options={{ title: t('notFound.title') }} />
|
||||
<View style={[styles.container, { backgroundColor: colors.background }]}>
|
||||
<Text style={[styles.title, { color: colors.text }]}>{t('notFound.title')}</Text>
|
||||
<Text style={[styles.description, { color: colors.textMuted }]}>
|
||||
{t('notFound.description')}
|
||||
</Text>
|
||||
<Link href="/" style={[styles.link, { color: colors.brand }]}>
|
||||
{t('notFound.backToDashboard')}
|
||||
</Link>
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
padding: 20,
|
||||
gap: 12,
|
||||
},
|
||||
title: {
|
||||
fontSize: 22,
|
||||
fontWeight: '700',
|
||||
},
|
||||
description: {
|
||||
fontSize: 15,
|
||||
textAlign: 'center',
|
||||
},
|
||||
link: {
|
||||
marginTop: 8,
|
||||
fontSize: 16,
|
||||
fontWeight: '600',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user