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 (For {recipe.servings.amount} {recipe.servings.unit}
{recipe.instructions}
{/* Action buttons */}