From b3448023462e2d1b124e9cfae4f91198191442ba Mon Sep 17 00:00:00 2001 From: "Corentin \"Koroh\" RICHARD" Date: Sun, 9 Apr 2023 15:11:56 +0200 Subject: [PATCH] clean up of the project --- components/ListItemComponent.tsx | 5 +- components/mainComponent.tsx | 41 --------- models/Card.tsx | 121 ++------------------------ models/CardSet.tsx | 37 -------- models/Classe.tsx | 4 - models/Type.tsx | 5 -- navigation/ListNavigator.tsx | 21 ----- navigation/Navigation.tsx | 7 -- navigation/StackNavigation.tsx | 2 - props/{favprops.tsx => favProps.tsx} | 0 redux/actions/actionSelection.tsx | 67 ++------------ redux/actions/action_setCardsList.tsx | 7 +- redux/actions/action_setFavList.tsx | 4 +- redux/constants.tsx | 4 - redux/reducers/appReducer.tsx | 14 +-- redux/store.tsx | 2 - screens/HomeScreen.tsx | 33 ++----- screens/ListFav.tsx | 20 +---- screens/ListScreen.tsx | 38 +------- service/AsyncStorage.tsx | 4 +- 20 files changed, 45 insertions(+), 391 deletions(-) delete mode 100644 components/mainComponent.tsx delete mode 100644 models/CardSet.tsx delete mode 100644 models/Classe.tsx delete mode 100644 models/Type.tsx delete mode 100644 navigation/ListNavigator.tsx rename props/{favprops.tsx => favProps.tsx} (100%) diff --git a/components/ListItemComponent.tsx b/components/ListItemComponent.tsx index e087af4..97cbe13 100644 --- a/components/ListItemComponent.tsx +++ b/components/ListItemComponent.tsx @@ -3,7 +3,7 @@ import { Card } from "../models/Card"; import { setFavList } from "../redux/actions/action_setFavList"; import { ImageBackground, TouchableHighlight, View } from "react-native"; import React, { useEffect } from "react"; -import {CardProps} from "../props/favprops" +import {CardProps} from "../props/favProps" import { FontAwesome } from '@expo/vector-icons'; import { StyleSheet} from 'react-native'; @@ -15,8 +15,7 @@ export default function Item(props: CardProps){ // a mettre dans components et d const dispatch = useDispatch() const HandleAddFav = (props : CardProps) => { - console.log("add new card") - dispatch(setFavList(props)); + dispatch(setFavList(props)); } return( diff --git a/components/mainComponent.tsx b/components/mainComponent.tsx deleted file mode 100644 index c7e5640..0000000 --- a/components/mainComponent.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { StatusBar } from 'expo-status-bar'; -import { StyleSheet, Text, View, Button } from 'react-native'; -import React, { useState } from "react"; - -// @ts-ignore -export default function Main(props : mainProps){ - const [count, setCount] = useState(0); - return ( - - - Maman, prend la caméra ! ! - - {count} -