From 89337b56b347fd08efeaf8541df40b228788d374 Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Tue, 7 Nov 2023 10:33:27 -0500 Subject: [PATCH] feat: improve ticket category creation modal BON-814 --- app/creator/create/CoverPicDropZone.tsx | 25 ++++++++++++------- .../create/[[...id]]/CreateTicketCategory.tsx | 6 +++++ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/app/creator/create/CoverPicDropZone.tsx b/app/creator/create/CoverPicDropZone.tsx index 5211b9a..230dc98 100644 --- a/app/creator/create/CoverPicDropZone.tsx +++ b/app/creator/create/CoverPicDropZone.tsx @@ -4,18 +4,23 @@ import React, { useCallback } from "react"; import { useDropzone } from "react-dropzone"; interface Props { + readonly text?: string; + readonly description?: React.ReactNode; + /** * If the user is creating or editing a cover picture, this will be the image */ - fileToUpload?: BondscapePreviewImage; + readonly fileToUpload?: BondscapePreviewImage; /** * If the user is editing the event but not modifying the cover picture, this will be the url of the cover picture */ - coverPicUrl?: string; - setCoverPic: (coverPic: BondscapePreviewImage) => void; + readonly coverPicUrl?: string; + readonly setCoverPic: (coverPic: BondscapePreviewImage) => void; } const CoverPicDropZone = ({ + text, + description, fileToUpload, coverPicUrl, setCoverPic, @@ -60,7 +65,7 @@ const CoverPicDropZone = ({ Drop the image here ) : ( -
+
-
-
+
+
- Upload cover + {text || "Upload a cover"}
-
- Or drop a cover +
+ Or drop it here
+ + {description &&
{description}
}
)} diff --git a/app/creator/create/[[...id]]/CreateTicketCategory.tsx b/app/creator/create/[[...id]]/CreateTicketCategory.tsx index 784c37c..76b2f7e 100644 --- a/app/creator/create/[[...id]]/CreateTicketCategory.tsx +++ b/app/creator/create/[[...id]]/CreateTicketCategory.tsx @@ -104,6 +104,12 @@ const CreateTicketCategory = ({
+ This image will be the one used to create the NFTs of the tickets for this category. +
+ } fileToUpload={values.coverPic} coverPicUrl={values.coverPicUrl} setCoverPic={(coverPic) =>