From c95100996d3f03a44e13b60260c27d033e8b91cf Mon Sep 17 00:00:00 2001 From: Louison PARANT Date: Tue, 5 Dec 2023 10:36:50 +0100 Subject: [PATCH] Code Smells Fix --- LeftOvers/screens/CreateProfile.tsx | 2 +- LeftOvers/screens/Profiles.tsx | 9 +-------- LeftOvers/screens/RecipeSuggestion.tsx | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/LeftOvers/screens/CreateProfile.tsx b/LeftOvers/screens/CreateProfile.tsx index 90be921..0f67009 100644 --- a/LeftOvers/screens/CreateProfile.tsx +++ b/LeftOvers/screens/CreateProfile.tsx @@ -1,5 +1,5 @@ import React, { useContext, useState } from 'react'; -import {StyleSheet, View, ScrollView, useWindowDimensions, TextInput, Image, Text, NativeEventEmitter, Pressable} from 'react-native'; +import {StyleSheet, View, ScrollView, useWindowDimensions, TextInput, Image, Text, Pressable} from 'react-native'; import { LinearGradient } from 'expo-linear-gradient'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import ValidateButton from '../components/ValidateButton'; diff --git a/LeftOvers/screens/Profiles.tsx b/LeftOvers/screens/Profiles.tsx index 7ff396c..c73af58 100644 --- a/LeftOvers/screens/Profiles.tsx +++ b/LeftOvers/screens/Profiles.tsx @@ -5,21 +5,14 @@ import { LinearGradient } from 'expo-linear-gradient'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import ProfileDetails from '../components/ProfileDetails'; -import ProfileDelete from '../components/ProfileDelete'; import ColorContext from '../theme/ColorContext'; import AsyncStorage from '@react-native-async-storage/async-storage'; import EventEmitter from './EventEmitter'; -import Profil from '../Models/Profil'; import { PaperProvider, Portal } from 'react-native-paper'; export default function Profiles({navigation, props}) { - const { colors, toggleColors } = useContext(ColorContext) - - const all = [] - const die = [{value: "Dairy free"}, {value: "Gluten free"}, {value: "Porkless"}, {value: "Vegan"}, {value: "Vegetarian"}, {value: "Pescatarian"}] - + const { colors } = useContext(ColorContext) const [visible, setVisible] = useState(false); - const [opacity, setOpacity] = useState(1); const [profiles, setProfiles] = useState([]); const [selectedProfileIndex, setSelectedProfileIndex] = useState(null); diff --git a/LeftOvers/screens/RecipeSuggestion.tsx b/LeftOvers/screens/RecipeSuggestion.tsx index d6bfa1a..ceb5025 100644 --- a/LeftOvers/screens/RecipeSuggestion.tsx +++ b/LeftOvers/screens/RecipeSuggestion.tsx @@ -25,7 +25,6 @@ export default function RecipeSuggestion(props) { const [minCpt, setMinCpt] = useState(0); const [maxCpt, setMaxCpt] = useState(4); const ingredientList = [{title: "Steak"}, {title: "Sheep Ribs"}, {title: "Rabbit Thigh"}, {title: "Ham"}, {title: "Cream (Liquid)"}, {title: "Pepper Bell"}] - const ingredientListV2 = [{title: "Smoked Salmon"}, {title: "Tomato"}, {title: "Carrot"}] const limitedList = ingredientList.slice(minCpt, maxCpt); const [colorIngredients, setColorIngredients] = useState("#59BDCD"); const [colorFilters, setColorFilters] = useState(colors.cardDetail);