Skip to content

Commit

Permalink
fix: cleanup and update countdown time
Browse files Browse the repository at this point in the history
  • Loading branch information
samderanova committed Nov 4, 2023
1 parent 74baf6d commit 40505ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ interface ClipboardScheduleProps {
}

// 10/4/23 10AM in UTC
const hackingStarts = new Date(Date.UTC(2023, 10, 4, 15, 22, 50));
const hackingStarts = new Date(Date.UTC(2023, 10, 4, 17, 0, 0));
const hackingEnds = new Date(Date.UTC(2023, 10, 5, 3, 0, 0));

const ClipboardSchedule: React.FC<ClipboardScheduleProps> = ({ schedule }) => {
Expand Down
5 changes: 1 addition & 4 deletions apps/site/src/app/schedule/ClipboardSchedule/Countdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ const Countdown: React.FC<CountdownProps> = ({
useEffect(() => {
setRemainingSeconds((countdownTo.valueOf() - new Date().valueOf()) / 1000);
const interval = setInterval(() => {
setRemainingSeconds((r) => {
console.log(r);
return r > 0 && r < 1 ? r : r - 1;
});
setRemainingSeconds((r) => (r > 0 && r < 1 ? r : r - 1));
}, 1000);

return () => clearInterval(interval);
Expand Down

0 comments on commit 40505ff

Please sign in to comment.