make showFirstRun in localStorage a bool
This commit is contained in:
parent
1db4647327
commit
085adbaffd
@ -16,14 +16,17 @@
|
||||
|
||||
import { action, observable } from 'mobx';
|
||||
|
||||
const showFirstRun = window.localStorage.getItem('showFirstRun') !== '0';
|
||||
|
||||
export default class Store {
|
||||
@observable firstrunVisible = showFirstRun;
|
||||
@observable firstrunVisible = false;
|
||||
|
||||
constructor (api) {
|
||||
this._api = api;
|
||||
|
||||
const value = window.localStorage.getItem('showFirstRun');
|
||||
if (value) {
|
||||
this.firstrunVisible = JSON.parse(value);
|
||||
}
|
||||
|
||||
this._checkAccounts();
|
||||
}
|
||||
|
||||
@ -33,7 +36,7 @@ export default class Store {
|
||||
|
||||
@action toggleFirstrun = (visible = false) => {
|
||||
this.firstrunVisible = visible;
|
||||
window.localStorage.setItem('showFirstRun', visible ? '1' : '0');
|
||||
window.localStorage.setItem('showFirstRun', JSON.stringify(!!visible));
|
||||
}
|
||||
|
||||
_checkAccounts () {
|
||||
|
Loading…
Reference in New Issue
Block a user