diff --git a/app/dashboard/admin/page.tsx b/app/dashboard/admin/page.tsx
index e5133f4..2ef37bf 100644
--- a/app/dashboard/admin/page.tsx
+++ b/app/dashboard/admin/page.tsx
@@ -345,7 +345,7 @@ export default function AdminDashboard() {
{/* Ingredient list table */}
<>
diff --git a/app/providers.tsx b/app/providers.tsx
index dca15b1..fca1714 100644
--- a/app/providers.tsx
+++ b/app/providers.tsx
@@ -7,5 +7,14 @@ type Props = {
};
export const NextAuthProvider = ({ children }: Props) => {
- return
{children};
+ return (
+
+ {children}
+
+ );
};
diff --git a/components/IngredientCard.tsx b/components/IngredientCard.tsx
index d2c44db..973ebc7 100644
--- a/components/IngredientCard.tsx
+++ b/components/IngredientCard.tsx
@@ -1,15 +1,26 @@
"use client";
-import React, { FC, useState } from "react";
-import Image, { StaticImageData } from "next/image";
+import { FC, useState } from "react";
+import Image from "next/image";
interface IngredientProps {
name: string;
}
const Ingredient: FC
= ({ name }) => {
+ const [userHas, setUserHas] = useState(false);
+ const handleClick = () => {
+ setUserHas(!userHas);
+ };
return (
<>
-
+
{name}
>
diff --git a/components/RecipeCard.tsx b/components/RecipeCard.tsx
index 45bb9d3..5f6184a 100644
--- a/components/RecipeCard.tsx
+++ b/components/RecipeCard.tsx
@@ -39,7 +39,7 @@ const RecipeCard: FC
= ({ name, img, ingredients, step }) => {
{/* Card Image */}
= ({ name, img, ingredients, step }) => {
{/* Modal */}
-
+
-
-
{name}
+
+
{name}
Ingredients:
{ingredients.map((e, i) => (
diff --git a/next.config.js b/next.config.js
index ea770a2..eee2b65 100644
--- a/next.config.js
+++ b/next.config.js
@@ -5,7 +5,7 @@ const nextConfig = {
},
swcMinify: true,
images: {
- domains: ["source.unsplash.com"],
+ domains: ["source.unsplash.com", "picsum.photos"],
},
};
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index ea6ab29..5ee6b97 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -11,12 +11,13 @@ datasource db {
}
model User {
- name String
- email String @unique
- isAdmin Boolean @default(false)
- password String
- id Int @id @default(autoincrement())
- orders Order[]
+ name String
+ email String @unique
+ isAdmin Boolean @default(false)
+ password String
+ id Int @id @default(autoincrement())
+ orders Order[]
+ ingredients Ingredient[]
}
model Category {
@@ -32,6 +33,7 @@ model Ingredient {
categoryId Int
category Category @relation(fields: [categoryId], references: [id])
recipes IngredientsOnRecipes[]
+ users User[]
}
model Recipe {
@@ -71,4 +73,4 @@ model Payment {
orderId Int @unique
isPaid Boolean @default(false)
order Order @relation(fields: [orderId], references: [id])
-}
+}
\ No newline at end of file