Skip to content

Commit

Permalink
fixes timer issue
Browse files Browse the repository at this point in the history
  • Loading branch information
peclarke committed Oct 4, 2024
1 parent d2c7b42 commit 2f4e2e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Countdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ const Countdown = () => {

const [ hours, minutes, seconds ] = useMemo(() => {
// calculate time left
const days = Math.floor(countDown / (1000 * 60 * 60 * 24));
const hours = Math.floor(
(countDown % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
);
const minutes = Math.floor((countDown % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((countDown % (1000 * 60)) / 1000);

return [days, hours, minutes, seconds];
return [hours, minutes, seconds];
}, [countDown]);

return (
Expand Down

0 comments on commit 2f4e2e1

Please sign in to comment.