Skip to content

Commit f1e5cc9

Browse files
committed
Updated Clock.tsx
1 parent 37ba772 commit f1e5cc9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/clock/Clock.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export default function Clock() {
99
const getTimeString = (value: Date) => {
1010
// show the colon for two seconds, then hide for one second
1111
// 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;
12+
const hideColon = value.getSeconds() % 3 === 2;
1313
const formatted = value.toLocaleTimeString('en-US', { hour: "numeric", minute: "numeric" });
14-
if (showColon) {
14+
if (hideColon) {
1515
return formatted.replace(':', ' ');
1616
}
1717
return formatted;

0 commit comments

Comments
 (0)