Skip to content

Commit 5745d20

Browse files
committed
2 parents a76858b + d69c5bb commit 5745d20

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/(home)/components/CountdownTimer.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ export default function CountdownTimer({ eventDate }: CountdownTimerProps) {
2323
}, [eventDate]); // Dependency array ensures the function updates when `eventDate` changes
2424

2525
const [timeLeft, setTimeLeft] = useState(calculateTimeLeft());
26+
const [isClient, setIsClient] = useState(false);
2627

2728
useEffect(() => {
29+
setIsClient(true);
30+
2831
const timer = setInterval(() => {
2932
setTimeLeft(calculateTimeLeft());
3033
}, 1000);

0 commit comments

Comments
 (0)