diff --git a/app/(tabs)/home.tsx b/app/(tabs)/home.tsx
index 8e60ab6..cdaabe2 100644
--- a/app/(tabs)/home.tsx
+++ b/app/(tabs)/home.tsx
@@ -4,8 +4,9 @@ import SetStatus from '@/components/setStatus';
import { ThemedView, } from '@/components/themed-view';
import Constants from 'expo-constants'; //pour connaître la taille de la barre menu de l'OS en haut
import React from 'react';
-import { StyleSheet, View } from 'react-native';
+import { StyleSheet, View,Text } from 'react-native';
import { useChantier } from '../ContextChantier';
+import Anomaly from '@/components/anomaly';
@@ -25,7 +26,7 @@ export default function Home() {
-
+
)
@@ -47,5 +48,8 @@ const styles = StyleSheet.create({
summary:{
marginTop:60,
padding:10,
+ },
+ anomaly:{
+ padding:10,
}
});
\ No newline at end of file
diff --git a/app/login/login.tsx b/app/login/login.tsx
index 8749b17..2f8531f 100644
--- a/app/login/login.tsx
+++ b/app/login/login.tsx
@@ -35,7 +35,7 @@ const LoginScreen: React.FC = () => {
return (
- Se connecter / S'incrire
+ Se connecter
;
+};
+
+export default function Anomaly({data,style , ...otherProps }: Props) {
+
+ return(
+
+ {data.chantier ? (
+
+ Anomalies
+ {data.chantier.anomalies.length > 0 ? (
+ data.chantier.anomalies.map((anomaly, index) => (
+
+ • {anomaly}
+
+ ))
+ ) : (
+ Aucune anomalie
+ ) }
+
+ ): null}
+
+ )
+}
+
+const styles = StyleSheet.create({
+ //Anomalies styles
+ anomaliesContainer: {
+ padding: 5,
+ borderRadius: 10,
+ height: 150,
+ },
+ anomaliesTitle: {
+ fontSize: 16,
+ fontWeight: "bold",
+ marginBottom: 8,
+ },
+ anomalyItem: {
+ padding: 8,
+ marginBottom: 5,
+ borderRadius: 8,
+ },
+ noAnomaly: {
+ fontStyle: "italic",
+ opacity: 0.7,
+ },
+});
\ No newline at end of file