From bda9509efd93047ceaa1fbe922ba621540700de1 Mon Sep 17 00:00:00 2001 From: Amalie Date: Thu, 1 Oct 2026 10:52:51 +0200 Subject: [PATCH] =?UTF-8?q?Har=20lagt=20RecipeCards=20og=20RecipeList=20p?= =?UTF-8?q?=C3=A5=20siden=20under=20oppskrifter(#24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/recipe/RecipeCard.tsx | 6 +++--- client/src/components/recipe/RecipeList.tsx | 4 ++-- client/src/routes/RecipeListPage.tsx | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/client/src/components/recipe/RecipeCard.tsx b/client/src/components/recipe/RecipeCard.tsx index ce55e76..a189a4e 100644 --- a/client/src/components/recipe/RecipeCard.tsx +++ b/client/src/components/recipe/RecipeCard.tsx @@ -7,9 +7,9 @@ type RecipeCardProps = { export function RecipeCard({ recipe }: RecipeCardProps) { return ( -
- {recipe.title}/ -

{recipe.title}

+
+ {recipe.title}/ +

{recipe.title}

{recipe.prepTime} minutter

{recipe.portions} porsjoner

diff --git a/client/src/components/recipe/RecipeList.tsx b/client/src/components/recipe/RecipeList.tsx index dad884a..cf72f88 100644 --- a/client/src/components/recipe/RecipeList.tsx +++ b/client/src/components/recipe/RecipeList.tsx @@ -8,9 +8,9 @@ type RecipeListProps = { export function RecipeList({ recipes }: RecipeListProps) { return ( -
    +
      {recipes.map((recipe)=> ( -
    • +
    • ))} diff --git a/client/src/routes/RecipeListPage.tsx b/client/src/routes/RecipeListPage.tsx index 59cc546..9db5c1a 100644 --- a/client/src/routes/RecipeListPage.tsx +++ b/client/src/routes/RecipeListPage.tsx @@ -1,4 +1,6 @@ import { useSearchParams } from 'react-router'; +import { RecipeList } from '../components/recipe/RecipeList'; +import { recipes} from '../mocks/recipes'; // Listen over alle oppskrifter eller søksresultatet // Selve søkefeltet ligger i headeren. Resultatene kobles til senere. @@ -11,6 +13,7 @@ export default function RecipeListPage() {

      Oppskrifter

      {query &&

      Alt med «{query}»

      } + ); }