refactor: cleanup, use createRef etc

This commit is contained in:
David Ralph
2021-08-27 23:08:32 +01:00
parent fcff3e44a6
commit 4db47d9fec
13 changed files with 106 additions and 91 deletions

View File

@@ -18,13 +18,17 @@ export default class TimeSettings extends PureComponent {
localStorage.setItem('location', this.state.location);
}
showReminder() {
document.querySelector('.reminder-info').style.display = 'block';
localStorage.setItem('showReminder', true);
}
changeLocation(e) {
this.setState({
location: e.target.value
});
document.querySelector('.reminder-info').style.display = 'block';
localStorage.setItem('showReminder', true);
this.showReminder();
}
getAuto() {
@@ -34,8 +38,7 @@ export default class TimeSettings extends PureComponent {
location: data[0].name
});
document.querySelector('.reminder-info').style.display = 'block';
localStorage.setItem('showReminder', true);
this.showReminder();
}, (error) => {
// firefox requires this 2nd function
console.log(error);