mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
fix: format minutes and seconds in Giveaway component for better readability
This commit is contained in:
1 parent
9286104391
commit
7e8fd40c61
1 file changed
+6
-2
@@ -22,8 +22,12 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
|
|||||||
|
|
||||||
if (timeLeft > 0) {
|
if (timeLeft > 0) {
|
||||||
const hours = Math.floor(timeLeft / (1000 * 60 * 60));
|
const hours = Math.floor(timeLeft / (1000 * 60 * 60));
|
||||||
const minutes = Math.floor((timeLeft / (1000 * 60)) % 60);
|
const minutes = Math.floor((timeLeft / (1000 * 60)) % 60)
|
||||||
const seconds = Math.floor((timeLeft / 1000) % 60);
|
.toString()
|
||||||
|
.padStart(2, "0");
|
||||||
|
const seconds = Math.floor((timeLeft / 1000) % 60)
|
||||||
|
.toString()
|
||||||
|
.padStart(2, "0");
|
||||||
|
|
||||||
string = (
|
string = (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in new issue
Block a user