Refactor ingredient mapping to exclude location and convert quantity to number
This commit is contained in:
@@ -86,7 +86,7 @@ export default function EditRecipePage() {
|
||||
// Konvertera quantity till number för varje ingrediens
|
||||
const recipeToSend = {
|
||||
...recipe,
|
||||
ingredients: recipe.ingredients.map((ing) => ({
|
||||
ingredients: recipe.ingredients.map(({ location: _loc, ...ing }) => ({
|
||||
...ing,
|
||||
quantity: Number(ing.quantity),
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user