From f6ae31fd04f8a11282ab6c1eb75d56d8eebd33de Mon Sep 17 00:00:00 2001
From: Lucid Kobold <72232219+LucidKobold@users.noreply.github.com>
Date: Sun, 3 Apr 2022 02:03:10 -0500
Subject: [PATCH] Updated the add sticker modal. Disabled the next button on
the edit modal when no sticker has been selected.
---
.../calender/modals/AddUpdateSticker.tsx | 31 +++++++++++++------
package.json | 2 +-
theme/layout/Header.tsx | 2 +-
3 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/components/calender/modals/AddUpdateSticker.tsx b/components/calender/modals/AddUpdateSticker.tsx
index 5691816..f38a6ce 100644
--- a/components/calender/modals/AddUpdateSticker.tsx
+++ b/components/calender/modals/AddUpdateSticker.tsx
@@ -58,6 +58,8 @@ const AddUpdateSticker = ({
const { addEditSticker } = useContext(StickersContext);
+ // ! Update these states to sat "add" and "edit" for easier reading.
+
const [modalVariant] = useState<"currDate" | "notCurrDate">(
isSameDay(date, new Date()) ? "currDate" : "notCurrDate"
);
@@ -80,12 +82,23 @@ const AddUpdateSticker = ({
{
header: `Which sticker did you earn for ${format(date, "LLL d, y")}?`,
body: (
-
+
+
+ {"Select a sticker"}
+
+
+
),
footer: (