diff --git a/src/Components/FoodElem/Ingredientlist/NewIngredientList.js b/src/Components/FoodElem/Ingredientlist/NewIngredientList.js index 5b1d194..cefb62b 100644 --- a/src/Components/FoodElem/Ingredientlist/NewIngredientList.js +++ b/src/Components/FoodElem/Ingredientlist/NewIngredientList.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; /** @@ -11,19 +11,17 @@ import PropTypes from 'prop-types'; */ function NewIngredientList({data, orderDetails, setOrderDetails}) { - let current = {value: "", done: false}; - - const [fullData, setFullData] = useState(data.map((elem => { - return { - id: elem.id, - name: elem.name, - color_green: 'bg-kitchen-food-ingredient-green', - color_red: 'bg-kitchen-food-ingredient-red', - add: false, - del: false, - all: false - } - }))); + // const [fullData, setFullData] = useState(data.map((elem => { + // return { + // id: elem.id, + // name: elem.name, + // color_green: 'bg-kitchen-food-ingredient-green', + // color_red: 'bg-kitchen-food-ingredient-red', + // add: false, + // del: false, + // all: false + // } + // }))); const handleClick = (event) => { let style = event.target.className @@ -40,7 +38,7 @@ function NewIngredientList({data, orderDetails, setOrderDetails}) { event.target.className = style } - const choice = fullData.map((elem) => + const choice = data.map((elem) =>