diff --git a/frontend/src/app/seller/fundraiser/[id]/components/ItemDialog.tsx b/frontend/src/app/seller/fundraiser/[id]/components/ItemDialog.tsx index 4346c77d..d93b0b2e 100644 --- a/frontend/src/app/seller/fundraiser/[id]/components/ItemDialog.tsx +++ b/frontend/src/app/seller/fundraiser/[id]/components/ItemDialog.tsx @@ -14,6 +14,7 @@ import { DialogTitle, } from "@/components/ui/dialog"; import UploadImageComponent from "@/components/custom/UploadImageComponent"; +import { UnsplashPickerModal } from "@/components/custom/UnsplashPickerModal"; import { UseFormReturn } from "react-hook-form"; import { CompleteItemSchema, CreateFundraiserItemBody } from "common"; import { z } from "zod"; @@ -21,9 +22,11 @@ import { toast } from "sonner"; import { DEFAULT_ITEM_VALUES } from "./EditItems"; import { Textarea } from "@/components/ui/textarea"; import { Button } from "@/components/ui/button"; -import { SetStateAction } from "react"; +import { SetStateAction, useState } from "react"; import { Input } from "@/components/ui/input"; import { Decimal } from "decimal.js"; +import { ImageIcon, X } from "lucide-react"; +import Image from "next/image"; // Type for tracking pending new items export type PendingItemChanges = { @@ -68,6 +71,8 @@ export function ItemDialog({ onAddPendingItem?: OnAddPendingItem; onUpdatePendingItem?: OnUpdatePendingItem; }) { + const [unsplashOpen, setUnsplashOpen] = useState(false); + const handleSubmitItem = async ( data: z.infer ) => { @@ -128,110 +133,158 @@ export function ItemDialog({ }; return ( - - -
- - - - {mode === "add" - ? "Add Fundraiser Item" - : "Edit Fundraiser Item"} - - -
- ( - - Item Name - - - - - - )} - /> - - ( - - Description - -