format fix
This commit is contained in:
parent
a38d016137
commit
94a60e0f20
@ -12,9 +12,9 @@ class App extends React.Component {
|
|||||||
render(): JSX.Element {
|
render(): JSX.Element {
|
||||||
return <div>
|
return <div>
|
||||||
<div className="center-wrapper">
|
<div className="center-wrapper">
|
||||||
<Clock/>
|
<Clock />
|
||||||
<Search/>
|
<Search />
|
||||||
<Quick/>
|
<Quick />
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
@ -45,12 +45,12 @@ class Clock extends React.Component<{}, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
startTimer() {
|
startTimer() {
|
||||||
this.interval = setInterval(()=>{
|
this.interval = setInterval(() => {
|
||||||
this.updateTime();
|
this.updateTime();
|
||||||
|
|
||||||
// This will change only if the tab stays open after midnight. But still, lets cover that
|
// This will change only if the tab stays open after midnight. But still, lets cover that
|
||||||
this.updateDate();
|
this.updateDate();
|
||||||
},1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -59,7 +59,7 @@ class Clock extends React.Component<{}, State> {
|
|||||||
this.startTimer();
|
this.startTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount(){
|
componentWillUnmount() {
|
||||||
clearInterval(this.interval);
|
clearInterval(this.interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user