diff --git a/app/(tabs)/(help)/HelpsScreen.tsx b/app/(tabs)/(help)/HelpsScreen.tsx index 48e20f0..2832f43 100644 --- a/app/(tabs)/(help)/HelpsScreen.tsx +++ b/app/(tabs)/(help)/HelpsScreen.tsx @@ -1,12 +1,14 @@ import {SafeAreaView, Text, View} from "react-native"; import React from "react"; +import Error, {ProblemProps} from "@/app/(utility)/Error"; +import NotFound from "@/components/error/NotFoundProblem"; +import {NOT_FOUND} from "@/components/Errors"; export default function HelpsScreen() { return ( - Welcome to Help Screen - We will do it soon + diff --git a/app/(utility)/Error.tsx b/app/(utility)/Error.tsx new file mode 100644 index 0000000..78de8a0 --- /dev/null +++ b/app/(utility)/Error.tsx @@ -0,0 +1,28 @@ +import Text from "@/components/ui/Text"; +import React, {forwardRef} from "react"; +import {Image, View, ViewProps} from "react-native"; +import BackButton from "@/components/BackButton"; + +export interface ProblemProps extends ViewProps{ + picture: string; + problem: string; + description: string; + information: string; + isVisible?: boolean; +} + +export default forwardRef (({className, ...Props}, ref) => { + return ( + + + + + + + {Props.problem} + {Props.description} + + {Props.information} + + ); +}); \ No newline at end of file diff --git a/assets/images/NotFound.png b/assets/images/NotFound.png new file mode 100644 index 0000000..651b820 Binary files /dev/null and b/assets/images/NotFound.png differ diff --git a/components/Errors.tsx b/components/Errors.tsx index f0e9a38..b85981e 100644 --- a/components/Errors.tsx +++ b/components/Errors.tsx @@ -1,3 +1,10 @@ export const EMPTY_FIELD = "Un des champs est vide !"; export const INVALID_EMAIL = "Adresse mail invalide !"; export const NOT_MATCHING_PASSWORD = "Les mots de passe sont différents"; + +export const NOT_FOUND = "Ressource introuvable :<"; +export const NO_INTERNET = "Pas de connexion à internet"; +export const INTERNAL_ERROR = "Erreur interne, veuillez nous pardonner"; +export const MAINTENANCE = "Le serveur est en maintenance, veuillez réessayer plus tard"; +export const NOT_AUTHORIZED = "Vous n'êtes pas autorisé à accéder à cette ressource"; +export const FEATURE_LOCKED = "Cette fonctionnalité est verrouillée"; \ No newline at end of file diff --git a/components/error/NotFoundProblem.tsx b/components/error/NotFoundProblem.tsx new file mode 100644 index 0000000..21cab7b --- /dev/null +++ b/components/error/NotFoundProblem.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import {NOT_FOUND} from "@/components/Errors"; +import Error from "@/app/(utility)/Error"; +import notFoundPict from "@/assets/images/NotFound.png"; + +export default function NotFound() { + return ( + + ); +} \ No newline at end of file