We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37ba772 commit f1e5cc9Copy full SHA for f1e5cc9
1 file changed
src/components/clock/Clock.tsx
@@ -9,9 +9,9 @@ export default function Clock() {
9
const getTimeString = (value: Date) => {
10
// show the colon for two seconds, then hide for one second
11
// there's probably a better way to do this but i wanted to show the clock was "running"
12
- const showColon = value.getSeconds() % 3 !== 2;
+ const hideColon = value.getSeconds() % 3 === 2;
13
const formatted = value.toLocaleTimeString('en-US', { hour: "numeric", minute: "numeric" });
14
- if (showColon) {
+ if (hideColon) {
15
return formatted.replace(':', ' ');
16
}
17
return formatted;
0 commit comments