diff --git a/client/src/components/recipe/RecipeCard.tsx b/client/src/components/recipe/RecipeCard.tsx index 57609b1..c8f7183 100644 --- a/client/src/components/recipe/RecipeCard.tsx +++ b/client/src/components/recipe/RecipeCard.tsx @@ -4,6 +4,7 @@ import { Rating } from '@mui/material'; import { RecipeImage } from '../ui/RecipeImage'; import RestaurantIcon from '@mui/icons-material/Restaurant'; import AccessTimeIcon from '@mui/icons-material/AccessTime'; +import { FavoriteButton } from '../favorites/FavoriteButton'; // Sier hva komponenten får inn. type RecipeCardProps = { @@ -12,30 +13,35 @@ type RecipeCardProps = { export function RecipeCard({ recipe }: RecipeCardProps) { return ( - -
- -
-

{recipe.title}

-
-

{recipe.prepTimeMinutes} min

-

·

-

{recipe.servings} porsjoner

+
+ +
+ +
+

{recipe.title}

+
+

{recipe.prepTimeMinutes} min

+

·

+

{recipe.servings} porsjoner

+
+
+ {recipe.averageRating !== null ?( + + ) : (

Ingen rating ennå

+ )} +
-
- {recipe.averageRating !== null ?( - - ) : (

Ingen rating ennå

- )} -
-
-
- + + +
+ +
+ ); } diff --git a/client/src/components/recipe/RecipeDetail.tsx b/client/src/components/recipe/RecipeDetail.tsx index e851c6e..80b4fcc 100644 --- a/client/src/components/recipe/RecipeDetail.tsx +++ b/client/src/components/recipe/RecipeDetail.tsx @@ -8,6 +8,7 @@ import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; import AddIcon from '@mui/icons-material/Add'; import RemoveIcon from '@mui/icons-material/Remove'; +import { FavoriteButton } from '../favorites/FavoriteButton'; // Sier hva komponenten får inn. type RecipeDetailProps = { @@ -34,7 +35,7 @@ export function RecipeDetail({ recipe }: RecipeDetailProps) { return (
-
+
    {recipe.tags.map((tag) => ( @@ -60,15 +61,19 @@ export function RecipeDetail({ recipe }: RecipeDetailProps) {

    {recipe.description}

    -
    +

    {recipe.prepTimeMinutes} minutter

    +

    ·

    {recipe.servings} porsjoner

-
+
+
+ +
-
+

Ingredienser

@@ -126,7 +131,7 @@ export function RecipeDetail({ recipe }: RecipeDetailProps) { ))}
-
+

Fremgangsmåte

    {recipe.steps.map((step) => (