Update countdown text format in UptimeStatusIsland component for clarity
- Changed countdown display from 'XXs' to 'XX sec' for improved readability and consistency in the UptimeStatusIsland component.
This commit is contained in:
@@ -252,7 +252,7 @@ export default function UptimeStatusIsland() {
|
|||||||
const barPercent = (barValue / totalBarSeconds) * 100;
|
const barPercent = (barValue / totalBarSeconds) * 100;
|
||||||
const barGradient = 'linear-gradient(90deg, #0161ef 0%, #0154cf 100%)';
|
const barGradient = 'linear-gradient(90deg, #0161ef 0%, #0154cf 100%)';
|
||||||
|
|
||||||
// Format countdown as 'X min XX sec' or 'XXs'
|
// Format countdown as 'X min XX sec' or 'XX sec'
|
||||||
let countdownText = '--';
|
let countdownText = '--';
|
||||||
if (typeof secondsToNextUpdate === 'number' && secondsToNextUpdate >= 0) {
|
if (typeof secondsToNextUpdate === 'number' && secondsToNextUpdate >= 0) {
|
||||||
if (secondsToNextUpdate >= 60) {
|
if (secondsToNextUpdate >= 60) {
|
||||||
@@ -260,7 +260,7 @@ export default function UptimeStatusIsland() {
|
|||||||
const sec = secondsToNextUpdate % 60;
|
const sec = secondsToNextUpdate % 60;
|
||||||
countdownText = `${min} min ${sec.toString().padStart(2, '0')} sec`;
|
countdownText = `${min} min ${sec.toString().padStart(2, '0')} sec`;
|
||||||
} else {
|
} else {
|
||||||
countdownText = `${secondsToNextUpdate}s`;
|
countdownText = `${secondsToNextUpdate} sec`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user