Updating some documentation.

This commit is contained in:
Lucid Kobold
2022-06-13 15:49:41 -05:00
parent 06df367277
commit 632674c898
3 changed files with 22 additions and 20 deletions

View File

@@ -57,10 +57,8 @@ const AddUpdateSticker = ({
const dispatch = useAppDispatch();
const currDateObj = new Date(date);
// ! Update these states to say "add" and "edit" for easier reading.
const [modalVariant] = useState<"currDate" | "notCurrDate">(
isSameDay(currDateObj, currDate) ? "currDate" : "notCurrDate"
const [modalVariant] = useState<"add" | "edit">(
isSameDay(currDateObj, currDate) ? "add" : "edit"
);
const handleClose = () => {
@@ -79,7 +77,7 @@ const AddUpdateSticker = ({
// * Double check that the submit button is disabled if the selected sticker is the same as the current sticker.
const variants = {
currDate: [
add: [
{
header: `Which sticker did you earn for ${format(
currDateObj,
@@ -118,7 +116,7 @@ const AddUpdateSticker = ({
)
}
],
notCurrDate: [
edit: [
{
header: `Which sticker did you want to update for ${format(
currDateObj,
@@ -234,7 +232,7 @@ const AddUpdateSticker = ({
onClose={() => handleClose()}
motionPreset="slideInBottom"
scrollBehavior="inside"
size={modalVariant === "currDate" ? "xl" : "2xl"}
size={modalVariant === "add" ? "xl" : "2xl"}
>
<ModalOverlay />
<ModalContent>