Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pablopunk committed Jan 20, 2020
1 parent 2c0581b commit bbcd71f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pages/index.tsx
Expand Up @@ -126,18 +126,19 @@ export default class extends React.Component<IProps, IState> {

tick() {
let time = whatTimeIsIt()
this.setState(time)
this.setState({ ...time })
}

componentDidMount() {
this.tick()
setInterval(() => {
this.tick()
}, 1000)

// Let colons blink twice a second
setInterval(() => {
const { lastTickHadColon } = this.state

this.setState({
lastTickHadColon: !lastTickHadColon
})
Expand Down Expand Up @@ -191,7 +192,9 @@ export default class extends React.Component<IProps, IState> {
<span id="minutes">{this.state.minutes}</span>
{this.props.seconds && (
<>
<span className="colon" style={{ opacity: colonOpacity }}>:</span>
<span className="colon" style={{ opacity: colonOpacity }}>
:
</span>
<span id="seconds">{this.state.seconds}</span>
</>
)}
Expand Down

1 comment on commit bbcd71f

@vercel
Copy link

@vercel vercel bot commented on bbcd71f Jan 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.