From 7092d09ba8c58899d6b0d5d609641a5cbd30dd07 Mon Sep 17 00:00:00 2001 From: Rochas Date: Thu, 11 Dec 2025 21:24:28 +0100 Subject: [PATCH] clean des composants, dossiers --- app/(tabs)/_layout.tsx | 2 +- app/(tabs)/addChantier.tsx | 20 ++++++------------- app/(tabs)/explore.tsx | 8 ++++---- app/(tabs)/gestion_ouvrier.tsx | 6 +++--- app/(tabs)/gestionnaire_ressource.tsx | 8 ++++---- app/(tabs)/home.tsx | 2 +- app/(tabs)/index.tsx | 8 ++++---- app/(tabs)/mapScreen.tsx | 2 +- app/(tabs)/templateSreen.tsx | 2 +- app/login/login.tsx | 6 +++--- app/modal.tsx | 4 ++-- components/anomaly.tsx | 4 ++-- components/chantierSummary.tsx | 4 ++-- .../{ => expoExempleComponents}/example.tsx | 0 .../external-link.tsx | 0 .../haptic-tab.tsx | 0 .../hello-wave.tsx | 0 .../parallax-scroll-view.tsx | 4 ++-- components/selectChantier.tsx | 10 +++++----- components/setStatus.tsx | 6 +++--- components/{ => theme}/themed-button.tsx | 0 components/{ => theme}/themed-mapview.tsx | 0 components/{ => theme}/themed-text.tsx | 0 components/{ => theme}/themed-textinput.tsx | 0 components/{ => theme}/themed-view.tsx | 0 components/ui/collapsible.tsx | 4 ++-- 26 files changed, 46 insertions(+), 54 deletions(-) rename components/{ => expoExempleComponents}/example.tsx (100%) rename components/{ => expoExempleComponents}/external-link.tsx (100%) rename components/{ => expoExempleComponents}/haptic-tab.tsx (100%) rename components/{ => expoExempleComponents}/hello-wave.tsx (100%) rename components/{ => expoExempleComponents}/parallax-scroll-view.tsx (93%) rename components/{ => theme}/themed-button.tsx (100%) rename components/{ => theme}/themed-mapview.tsx (100%) rename components/{ => theme}/themed-text.tsx (100%) rename components/{ => theme}/themed-textinput.tsx (100%) rename components/{ => theme}/themed-view.tsx (100%) diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index 784ad33..1542e4e 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -3,7 +3,7 @@ import { } from 'expo-router'; import React from 'react'; -import { HapticTab } from '@/components/haptic-tab'; +import { HapticTab } from '@/components/expoExempleComponents/haptic-tab'; import { IconSymbol } from '@/components/ui/icon-symbol'; import { Colors } from '@/constants/theme'; import { useColorScheme } from '@/hooks/use-color-scheme'; diff --git a/app/(tabs)/addChantier.tsx b/app/(tabs)/addChantier.tsx index f2bec10..36513ee 100644 --- a/app/(tabs)/addChantier.tsx +++ b/app/(tabs)/addChantier.tsx @@ -1,7 +1,7 @@ import ChantierSummary from '@/components/chantierSummary'; import SelectChantier from '@/components/selectChantier'; import SetStatus from '@/components/setStatus'; -import { ThemedView } from '@/components/themed-view'; +import { ThemedView } from '@/components/theme/themed-view'; import React, { useEffect, useState } from 'react'; import { StyleSheet, ScrollView, Button, TextInput, Text } from 'react-native'; import { useChantier } from '../ContextChantier'; @@ -9,9 +9,9 @@ import { useRessources } from '../ContextRessource'; import { useUser } from '../ContextUser'; import { getRessources, getUsers, addChantier } from '@/services/ressourcesService'; import { Chantier, Ressources } from '@/class/class'; -import { ThemedText } from '@/components/themed-text'; -import { ThemedButton } from '@/components/themed-button'; -import { ThemedTextInput } from '@/components/themed-textinput'; +import { ThemedText } from '@/components/theme/themed-text'; +import { ThemedButton } from '@/components/theme/themed-button'; +import { ThemedTextInput } from '@/components/theme/themed-textinput'; export default function AddChantier() { const { chantier, setChantier } = useChantier(); @@ -96,19 +96,11 @@ export default function AddChantier() { Équipe Ressources (); const scrollOffset = useScrollOffset(scrollRef); diff --git a/components/selectChantier.tsx b/components/selectChantier.tsx index cf81ed5..0a8879c 100644 --- a/components/selectChantier.tsx +++ b/components/selectChantier.tsx @@ -15,10 +15,10 @@ import { import Animated, { LinearTransition } from "react-native-reanimated"; -import { ThemedButton } from "./themed-button"; -import { ThemedText } from "./themed-text"; -import { ThemedTextInput } from "./themed-textinput"; -import { ThemedView } from "./themed-view"; +import { ThemedButton } from "./theme/themed-button"; +import { ThemedText } from "./theme/themed-text"; +import { ThemedTextInput } from "./theme/themed-textinput"; +import { ThemedView } from "./theme/themed-view"; const screenHeight = Dimensions.get("window").height; const { width, height } = Dimensions.get("window"); @@ -57,7 +57,7 @@ export default function SelectChantier() { } function onPressAddChantier(){ - router.push('/(tabs)/ajoute_chantier') + router.push('/(tabs)/addChantier') setIsOpen(false) } diff --git a/components/setStatus.tsx b/components/setStatus.tsx index 94acd19..5880ec6 100644 --- a/components/setStatus.tsx +++ b/components/setStatus.tsx @@ -3,9 +3,9 @@ import { changeChantierStatus } from "@/services/ressourcesService"; import { useState } from 'react'; import { Dimensions, LayoutAnimation, Modal, Pressable, StyleSheet, View } from 'react-native'; import Animated, { LinearTransition } from 'react-native-reanimated'; -import { ThemedButton } from './themed-button'; -import { ThemedText } from './themed-text'; -import { ThemedView } from "./themed-view"; +import { ThemedButton } from './theme/themed-button'; +import { ThemedText } from './theme/themed-text'; +import { ThemedView } from "./theme/themed-view"; const { width, height } = Dimensions.get("window"); diff --git a/components/themed-button.tsx b/components/theme/themed-button.tsx similarity index 100% rename from components/themed-button.tsx rename to components/theme/themed-button.tsx diff --git a/components/themed-mapview.tsx b/components/theme/themed-mapview.tsx similarity index 100% rename from components/themed-mapview.tsx rename to components/theme/themed-mapview.tsx diff --git a/components/themed-text.tsx b/components/theme/themed-text.tsx similarity index 100% rename from components/themed-text.tsx rename to components/theme/themed-text.tsx diff --git a/components/themed-textinput.tsx b/components/theme/themed-textinput.tsx similarity index 100% rename from components/themed-textinput.tsx rename to components/theme/themed-textinput.tsx diff --git a/components/themed-view.tsx b/components/theme/themed-view.tsx similarity index 100% rename from components/themed-view.tsx rename to components/theme/themed-view.tsx diff --git a/components/ui/collapsible.tsx b/components/ui/collapsible.tsx index 6345fde..19be159 100644 --- a/components/ui/collapsible.tsx +++ b/components/ui/collapsible.tsx @@ -1,8 +1,8 @@ import { PropsWithChildren, useState } from 'react'; import { StyleSheet, TouchableOpacity } from 'react-native'; -import { ThemedText } from '@/components/themed-text'; -import { ThemedView } from '@/components/themed-view'; +import { ThemedText } from '@/components/theme/themed-text'; +import { ThemedView } from '@/components/theme/themed-view'; import { IconSymbol } from '@/components/ui/icon-symbol'; import { Colors } from '@/constants/theme'; import { useColorScheme } from '@/hooks/use-color-scheme';