mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
optimized imports
This commit is contained in:
parent
3656b6d218
commit
d4d200f6ef
6 changed files with 3 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
import { IUser } from '~/types/auth';
|
||||
import { EMPTY_USER } from '~/constants/auth';
|
||||
import { makeAutoObservable } from 'mobx';
|
||||
import { makePersistable, isHydrated } from 'mobx-persist-store';
|
||||
import { isHydrated, makePersistable } from 'mobx-persist-store';
|
||||
|
||||
export class AuthStore {
|
||||
token: string = '';
|
||||
|
@ -14,7 +14,7 @@ export class AuthStore {
|
|||
void makePersistable(this, {
|
||||
name: `vault48_auth_${process.env.REACT_APP_API_URL}`,
|
||||
properties: ['token', 'user', 'isTesterInternal'],
|
||||
storage: window.localStorage,
|
||||
storage: typeof window !== 'undefined' ? window.localStorage : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue