1
0
Fork 0
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:
Fedor Katurov 2022-01-09 20:34:27 +07:00
parent 3656b6d218
commit d4d200f6ef
6 changed files with 3 additions and 9 deletions

View file

@ -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,
});
}