Skip to content

Commit

Permalink
Add difference
Browse files Browse the repository at this point in the history
  • Loading branch information
midudev committed Feb 27, 2024
1 parent 89cae3c commit 6939e43
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/sections/Countdown.astro
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,16 @@ import { EVENT_TIMESTAMP } from "@/consts/event-date"
$seconds.innerText = formatTime((diff % MINUTE) / SECOND)
}

clearInterval(intervalId)
if (diff < 1000) {
clearInterval(intervalId)

$countdown.innerHTML = "¡La velada ha comenzado! 🎉"
$countdown.className = "text-primary uppercase font-semibold animate-fade-in text-3xl"
$countdown.innerHTML = "¡La velada ha comenzado! 🎉"
$countdown.className = "text-primary uppercase font-semibold animate-fade-in text-3xl"

import("canvas-confetti").then(({ default: confetti }) => {
confetti()
})
import("canvas-confetti").then(({ default: confetti }) => {
confetti()
})
}
}

intervalId = setInterval(updateCountdown, SECOND)
Expand Down

0 comments on commit 6939e43

Please sign in to comment.