diff --git a/src/Components/GoalModal/CreateGoalModal.tsx b/src/Components/GoalModal/CreateGoalModal.tsx index 6b88cd1..c91b77e 100644 --- a/src/Components/GoalModal/CreateGoalModal.tsx +++ b/src/Components/GoalModal/CreateGoalModal.tsx @@ -64,6 +64,14 @@ export default function CreateGoalModal({ const handleSubmit = async (event: React.FormEvent) => { event.preventDefault(); + if (deadline < new Date().toISOString().slice(0, 16)) { + showSnackBar({ + message: "過去の時間を設定することはできません", + type: "warning", + }); + return; + } + const postData: Goal = { userId: user?.userId as string, text: text, diff --git a/src/Components/Progress/StepperBlock.tsx b/src/Components/Progress/StepperBlock.tsx index b29b3ed..42f2d2f 100644 --- a/src/Components/Progress/StepperBlock.tsx +++ b/src/Components/Progress/StepperBlock.tsx @@ -50,6 +50,12 @@ export const StepperBlock = ({ : outerBorderColors.pending, boxShadow: "1px 1px 8px #d9d9d96b", gap: "6px", + backgroundColor: + resultType == "success" + ? "#eff9f1ad" + : resultType == "failed" + ? "#fff5f5" + : "#f6f8ff", }} >