Code Smells Fix
continuous-integration/drone/push Build is passing Details

pull/23/head
Louison PARANT 1 year ago
parent cd3db218f8
commit db50b29f46

@ -12,8 +12,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
export default function ModifyProfile(props) {
const {colors} = useContext(ColorContext);
const all = [{value: "Mussels"}, {value: "Skimmed Milk"}, {value: "Nuts"}]
const die = [{value: "Dairy free"}, {value: "Gluten free"}, {value: "Porkless"}, {value: "Vegan"}, {value: "Vegetarian"}, {value: "Pescatarian"}]
const [profile, setProfile] = useState(null);
const route = useRoute();

@ -15,10 +15,8 @@ import bracketLeft from '../assets/images/angle_bracket_left.png';
import bracketRight from '../assets/images/angle_bracket_right.png';
import plus from '../assets/images/plus_small.png';
import minus from '../assets/images/minus.png';
import { useNavigation } from '@react-navigation/native';
import RecipesServices from '../Services/Recipes/RecipesServices';
import Recipes from '../Models/Recipes';
import Ingredient from '../Models/Ingredient';
export default function RecipeSuggestion({ route, navigation }) {
@ -30,14 +28,12 @@ export default function RecipeSuggestion({ route, navigation }) {
const [maxCpt, setMaxCpt] = useState(4);
const [colorIngredients, setColorIngredients] = useState("#59BDCD");
const [colorFilters, setColorFilters] = useState(colors.cardDetail);
const [isLoading, setIsLoading] = useState(true);
const [response, setResponse] = useState<Recipes[] | undefined>(undefined);
const [selectedRecipes, setSelectedRecipes] = useState<Recipes[]>([]);
const recipeService = new RecipesServices();
const { ingredients } = route.params;
const limitedList = ingredients.slice(minCpt, maxCpt);
let selectedIngredients: string[];
const die = [{value: "Gluten free"}, {value: "Porkless"}, {value: "Gluten free"}, {value: "Porkless"}]
const all = []
@ -103,8 +99,7 @@ export default function RecipeSuggestion({ route, navigation }) {
}
} catch (error) {
} finally {
setIsLoading(false);
console.log(error)
}
};

Loading…
Cancel
Save