mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
optimized imports
This commit is contained in:
parent
3656b6d218
commit
d4d200f6ef
6 changed files with 3 additions and 9 deletions
|
@ -4,8 +4,6 @@ import { Icon } from '~/components/input/Icon';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { Placeholder } from '~/components/placeholders/Placeholder';
|
import { Placeholder } from '~/components/placeholders/Placeholder';
|
||||||
import { getPrettyDate } from '~/utils/dom';
|
import { getPrettyDate } from '~/utils/dom';
|
||||||
import { URLS } from '~/constants/urls';
|
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
id?: number;
|
id?: number;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
import { Route, Switch } from 'react-router';
|
|
||||||
import { TagSidebar } from '~/containers/sidebars/TagSidebar';
|
|
||||||
import { Authorized } from '~/components/containers/Authorized';
|
import { Authorized } from '~/components/containers/Authorized';
|
||||||
import { SubmitBar } from '~/components/bars/SubmitBar';
|
import { SubmitBar } from '~/components/bars/SubmitBar';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React, { FC, useEffect, useRef } from 'react';
|
import React, { FC, useEffect, useRef } from 'react';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { createPortal } from 'react-dom';
|
|
||||||
import { clearAllBodyScrollLocks, disableBodyScroll } from 'body-scroll-lock';
|
import { clearAllBodyScrollLocks, disableBodyScroll } from 'body-scroll-lock';
|
||||||
import { useCloseOnEscape } from '~/hooks';
|
import { useCloseOnEscape } from '~/hooks';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React, { useMemo, VFC } from 'react';
|
||||||
import { SidebarWrapper } from '~/containers/sidebars/SidebarWrapper';
|
import { SidebarWrapper } from '~/containers/sidebars/SidebarWrapper';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { Icon } from '~/components/input/Icon';
|
import { Icon } from '~/components/input/Icon';
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
import { TagSidebarList } from '~/components/sidebar/TagSidebarList';
|
import { TagSidebarList } from '~/components/sidebar/TagSidebarList';
|
||||||
import { LoaderCircle } from '~/components/input/LoaderCircle';
|
import { LoaderCircle } from '~/components/input/LoaderCircle';
|
||||||
import { InfiniteScroll } from '~/components/containers/InfiniteScroll';
|
import { InfiniteScroll } from '~/components/containers/InfiniteScroll';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { IUser } from '~/types/auth';
|
import { IUser } from '~/types/auth';
|
||||||
import { EMPTY_USER } from '~/constants/auth';
|
import { EMPTY_USER } from '~/constants/auth';
|
||||||
import { makeAutoObservable } from 'mobx';
|
import { makeAutoObservable } from 'mobx';
|
||||||
import { makePersistable, isHydrated } from 'mobx-persist-store';
|
import { isHydrated, makePersistable } from 'mobx-persist-store';
|
||||||
|
|
||||||
export class AuthStore {
|
export class AuthStore {
|
||||||
token: string = '';
|
token: string = '';
|
||||||
|
@ -14,7 +14,7 @@ export class AuthStore {
|
||||||
void makePersistable(this, {
|
void makePersistable(this, {
|
||||||
name: `vault48_auth_${process.env.REACT_APP_API_URL}`,
|
name: `vault48_auth_${process.env.REACT_APP_API_URL}`,
|
||||||
properties: ['token', 'user', 'isTesterInternal'],
|
properties: ['token', 'user', 'isTesterInternal'],
|
||||||
storage: window.localStorage,
|
storage: typeof window !== 'undefined' ? window.localStorage : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { FC, useEffect } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { INode, ITag } from '~/types';
|
import { INode, ITag } from '~/types';
|
||||||
import { NodeRelatedContextProvider } from '~/utils/context/NodeRelatedContextProvider';
|
import { NodeRelatedContextProvider } from '~/utils/context/NodeRelatedContextProvider';
|
||||||
import { INodeRelated } from '~/types/node';
|
import { INodeRelated } from '~/types/node';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue