import { useParams, Link } from "react-router-dom" import { recipes } from "../mock_data/recipes" /** * Displays the full detail of a single recipe, * including its ingredients, instructions, and image. */ export default function RecipeDetailView() { // Extract recipe ID from route params const { id } = useParams<{ id: string }>() const recipe = recipes.find((r) => r.id === id) if (!recipe) { return

Recipe not found.

} return (

{recipe.title}

{/* Recipe image */} {recipe.imageUrl && ( {recipe.title} )} {/* Ingredients */}

Zutaten

For {recipe.servings.amount} {recipe.servings.unit}

{/* Instructions */}

Zubereitung

{recipe.instructions}

{/* Action buttons */}
Bearbeiten Zurueck
) }