diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c038a46..dffc1c5 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -25,7 +25,11 @@ const Home: NextPage = ({ judgingDeadline }) => { useEffect(() => { const intervalId = setInterval(() => { const diff = JUDGING_DEADLINE.diffNow(); - setTimeLeft(diff.toFormat("hh:mm:ss")); + if (diff.toMillis() <= 0) { + setTimeLeft("Time is Up!"); + }else{ + setTimeLeft(diff.toFormat("hh:mm:ss")); + } }, 1000); return () => clearInterval(intervalId);