correction du template error + ajout des vues

pull/15/head
Vianney JOURDY 3 months ago committed by Anthony RICHARD
parent 8f89549737
commit 9e75786127

@ -1,13 +1,16 @@
import {SafeAreaView, View, Text} from "react-native";
import React from "react";
import InternalError from "@/components/error/InternalErrorProblem";
export default function AddScreen() {
return (
<SafeAreaView>
<View>
<Text className="m-7 font-extrabold">Welcome to Add Screen </Text>
<Text>We will do it soon</Text>
<InternalError/>
</View>
</SafeAreaView>
);
}
//<Text className="m-7 font-extrabold">Welcome to Add Screen </Text>
// <Text>We will do it soon</Text>

@ -1,14 +1,12 @@
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";
import Blocked from "@/components/error/BlockedProblem";
export default function HelpsScreen() {
return (
<SafeAreaView>
<View>
<NotFound/>
<Blocked/>
</View>
</SafeAreaView>

@ -3,6 +3,8 @@ import React, {forwardRef} from "react";
import {Image, View, ViewProps} from "react-native";
import BackButton from "@/components/BackButton";
import {Entypo} from "@expo/vector-icons";
export interface ProblemProps extends ViewProps{
picture: string;
problem: string;
@ -13,16 +15,23 @@ export interface ProblemProps extends ViewProps{
export default forwardRef<any, ProblemProps> (({className, ...Props}, ref) => {
return (
<View className={"gap-4 justify-between h-full" + " " + className} {...Props} ref={ref}>
<View className={"gap-4 justify-between h-3/4" + " " + className} {...Props} ref={ref}>
<View className="flex-row justify-between items-center p-4">
<BackButton/>
</View>
<Image source={Props.picture}/>
<Text position="center" weight="bold" size="3xl"> {Props.problem} </Text>
<Text size="lg" position="center"> {Props.description} </Text>
<View className="flex-row justify-center">
<Image className="aspect-square w-3/5 h-3/5" source={Props.picture}/>
</View>
<Text position="center" weight="bold" size="3xl"> {Props.problem} </Text>
<Text size="lg" position="center" className="text-gray-400"> {Props.description} </Text>
<View className="flex-row justify-center">
<View className="flex-row items-center border-2 rounded-2xl bg-red-300 border-red-600 p-4">
<Entypo name="warning" size={30} color="red"/>
<Text size="lg" position="center"> {Props.information} </Text>
</View>
</View>
</View>
);
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

@ -0,0 +1,15 @@
import React from "react";
import {FEATURE_LOCKED} from "@/components/Errors";
import Error from "@/app/(utility)/Error";
import blockedPict from "@/assets/images/Blocked.png";
export default function Blocked() {
return (
<Error
picture={blockedPict}
problem="Fonctionnalité bloquée"
description={FEATURE_LOCKED}
information="Devenez PREMIUM pour débloquer"
/>
);
}

@ -0,0 +1,15 @@
import React from "react";
import {INTERNAL_ERROR} from "@/components/Errors";
import Error from "@/app/(utility)/Error";
import internalErrorPict from "@/assets/images/InternalError.png";
export default function InternalError() {
return (
<Error
picture={internalErrorPict}
problem="Problème interne"
description={INTERNAL_ERROR}
information="Contactez le support"
/>
);
}

@ -0,0 +1,15 @@
import React from "react";
import {MAINTENANCE} from "@/components/Errors";
import Error from "@/app/(utility)/Error";
import maintenancePict from "@/assets/images/Maintenance.png";
export default function Maintenance() {
return (
<Error
picture={maintenancePict}
problem="Maintenance"
description={MAINTENANCE}
information="Revenez plus tard"
/>
);
}

@ -0,0 +1,15 @@
import React from "react";
import {NO_INTERNET} from "@/components/Errors";
import Error from "@/app/(utility)/Error";
import noInternetPict from "@/assets/images/NoInternet.png";
export default function NoInternet() {
return (
<Error
picture={noInternetPict}
problem="Pas d'internet"
description={NO_INTERNET}
information="Réessayez plus tard"
/>
);
}

@ -0,0 +1,15 @@
import React from "react";
import {NOT_AUTHORIZED} from "@/components/Errors";
import Error from "@/app/(utility)/Error";
import notAllowedPict from "@/assets/images/NotAllowed.png";
export default function NotAllowedProblem() {
return (
<Error
picture={notAllowedPict}
problem="Pas autorisé"
description={NOT_AUTHORIZED}
information="Connectez vous avec plus de privilèges"
/>
);
}
Loading…
Cancel
Save