feat: prática das aulas 7.5 até 7.7

This commit is contained in:
Sabrina Miranda 2023-01-25 08:11:17 -03:00
parent 7da2f241c5
commit ceba5c3e47

View File

@ -56,20 +56,20 @@ const Countdown = ({endDate}: CountdownProps) => {
hour: 0,
minute: 0,
second:0
})
});
}else {
setTime({
hour: hours,
minute: minutes,
second: seconds
})
});
}
};
useEffect(() => {
setInterval(updateTimer, 1000);
}, [])
}, []);
const hourString = time.hour.toString().padStart(2, "0");
const minuteString = time.minute.toString().padStart(2, "0");
@ -92,6 +92,6 @@ const Countdown = ({endDate}: CountdownProps) => {
</div>
</div>
);
}
};
export default Countdown;