1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-05 01:27:46 +07:00

(nextjs) added eslint and import sorting

This commit is contained in:
Fedor Katurov 2022-01-19 12:30:04 +07:00
parent e5f8d5a551
commit 0838bf7ee6
330 changed files with 1576 additions and 896 deletions

View file

@ -1,11 +1,13 @@
import useSWRInfinite, { SWRInfiniteKeyLoader } from 'swr/infinite';
import { GetLabNodesRequest, ILabNode } from '~/types/lab';
import { getLabNodes } from '~/api/lab';
import { flatten, last, uniqBy } from 'ramda';
import { useLabStore } from '~/store/lab/useLabStore';
import { useCallback, useMemo } from 'react';
import { INode } from '~/types';
import { flatten, last, uniqBy } from 'ramda';
import useSWRInfinite, { SWRInfiniteKeyLoader } from 'swr/infinite';
import { getLabNodes } from '~/api/lab';
import { useAuth } from '~/hooks/auth/useAuth';
import { useLabStore } from '~/store/lab/useLabStore';
import { INode } from '~/types';
import { GetLabNodesRequest, ILabNode } from '~/types/lab';
const getKey: (isUser: boolean) => SWRInfiniteKeyLoader = isUser => (index, prev: ILabNode[]) => {
if (!isUser) return null;

View file

@ -1,9 +1,11 @@
import useSWR from 'swr';
import { API } from '~/constants/api';
import { getLabStats, getLabUpdates } from '~/api/lab';
import { useLabStore } from '~/store/lab/useLabStore';
import { useCallback, useMemo } from 'react';
import useSWR from 'swr';
import { getLabStats, getLabUpdates } from '~/api/lab';
import { API } from '~/constants/api';
import { useAuth } from '~/hooks/auth/useAuth';
import { useLabStore } from '~/store/lab/useLabStore';
const refreshInterval = 1000 * 60 * 5; // 5 minutes