Skip to content

Commit

Permalink
better code
Browse files Browse the repository at this point in the history
  • Loading branch information
amDeimos666 committed Jun 13, 2023
1 parent 938b9fa commit 676cca4
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@ export const ExplorationStatus: FC = () => {
const minutes = Math.floor((total % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((total % (1000 * 60)) / 1000);

const minutesDiplay =
minutes < 10 ? '0' + minutes.toString() : minutes.toString();
const secondsDiplay =
seconds < 10 ? '0' + seconds.toString() : seconds.toString();
const minutesDiplay = minutes.toString().padStart(2, '0');
const secondsDiplay = seconds.toString().padStart(2, '0');

if (total < 0) {
setIsTimerActive(false);
Expand Down

0 comments on commit 676cca4

Please sign in to comment.