mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
(nextjs) added eslint and import sorting
This commit is contained in:
parent
e5f8d5a551
commit
0838bf7ee6
330 changed files with 1576 additions and 896 deletions
|
@ -1,6 +1,7 @@
|
|||
import { IComment, IFile } from '~/types';
|
||||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
import { IComment, IFile } from '~/types';
|
||||
|
||||
export interface CommentProviderProps {
|
||||
comments: IComment[];
|
||||
hasMore: boolean;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
import { FlowDisplay, IFlowNode, INode } from '~/types';
|
||||
|
||||
export interface FlowContextProps {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ILabNode } from '~/types/lab';
|
||||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
import { IFlowNode, ITag } from '~/types';
|
||||
import { ILabNode } from '~/types/lab';
|
||||
|
||||
export interface LabContextProps {
|
||||
isLoading: boolean;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { INode } from '~/types';
|
||||
import { EMPTY_NODE } from '~/constants/node';
|
||||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
import { EMPTY_NODE } from '~/constants/node';
|
||||
import { INode } from '~/types';
|
||||
|
||||
export interface NodeContextProps {
|
||||
node: INode;
|
||||
update: (node: Partial<INode>) => Promise<unknown>;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { INodeRelated } from '~/types/node';
|
||||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
import { INodeRelated } from '~/types/node';
|
||||
|
||||
interface NodeRelatedProviderProps {
|
||||
related: INodeRelated;
|
||||
isLoading: boolean;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import React, { createContext, FC, useContext } from 'react';
|
||||
import { Store } from '~/store';
|
||||
|
||||
import { observer } from 'mobx-react-lite';
|
||||
|
||||
import { Store } from '~/store';
|
||||
|
||||
export const StoreContext = createContext<Store>(new Store());
|
||||
|
||||
export const StoreContextProvider: FC<{ store: Store }> = observer(({ children, store }) => {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
import { ITag } from '~/types';
|
||||
|
||||
export interface TagContextProps {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
import { EMPTY_FILE } from '~/constants/uploads';
|
||||
import { useUploader } from '~/hooks/data/useUploader';
|
||||
import { IFile } from '~/types';
|
||||
import { EMPTY_FILE } from '~/constants/uploads';
|
||||
|
||||
export type Uploader = ReturnType<typeof useUploader>;
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
import React, { createContext, FC, useContext } from 'react';
|
||||
import { IUser } from '~/types/auth';
|
||||
|
||||
import { observer } from 'mobx-react-lite';
|
||||
|
||||
import { EMPTY_USER } from '~/constants/auth';
|
||||
import { useUser } from '~/hooks/auth/useUser';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import { IUser } from '~/types/auth';
|
||||
|
||||
|
||||
const UserContext = createContext<IUser>(EMPTY_USER);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue