fix: various bug fixes and refactor search settings

This commit is contained in:
David Ralph
2021-04-10 19:36:58 +01:00
parent dad43e969f
commit f4de44bbbb
11 changed files with 85 additions and 85 deletions

View File

@@ -22,20 +22,7 @@ export default class Widgets extends React.PureComponent {
}
enabled(key) {
const stringValue = localStorage.getItem(key);
let enabled = true;
if (stringValue !== null) {
if (stringValue === 'true') {
enabled = true;
}
if (stringValue === 'false') {
enabled = false;
}
}
return enabled;
return (localStorage.getItem(key) === 'true');
}
componentDidMount() {