This commit is contained in:
fred 2025-08-15 10:04:51 -07:00
parent 6169274fe1
commit 866922e0f2
8 changed files with 32 additions and 40 deletions

View file

@ -10,5 +10,4 @@ COPY . .
EXPOSE 80
# CMD ["npm", "run", "$NODE_ENV"]
CMD npm run $NODE_ENV

View file

@ -2,7 +2,7 @@ import { getRecipeIngredients } from "../services/frontendApi.js";
import { useState, useEffect } from "react";
function RecipeIngredients() {
const [recipeIngredients, setRecipeIngredients] = useState<Ingredient[]>([]);
const [recipeIngredients, setRecipeIngredients] = useState<string[]>([]);
const [error, setError] = useState<string | null>(null);
const [loading, setLoading] = useState(true);
@ -30,8 +30,8 @@ function RecipeIngredients() {
) : (
<div className="recipe-outer bg-amber-100 p-4 md:p-8 lg:p-12">
<div className="recipes-grid grid grid-cols-1 md:grid-cols-2 gap-6 lg:gap-8">
{recipeIngredients.map((ing) => (
<li key={ing.id}>{ing.raw}</li>
{recipeIngredients.map((ing, idx) => (
<li key={idx}>{ing}</li>
))}
</div>
</div>

View file

@ -145,7 +145,7 @@ function RecipePage() {
Ingredients:
</h4>
<ul className="space-y-2">
{recipe.ingredients.map((ingredient: Ingredient, index) => (
{recipe.ingredients.map((ingredient: string, index) => (
<li key={index} className="text-gray-700 flex items-start">
<span className="w-1.5 h-1.5 bg-amber-400 rounded-full mt-2 mr-3 flex-shrink-0"></span>
<span className="font-medium text-left">{ingredient}</span>