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

removed player reducer, migrated to CRA 5

This commit is contained in:
Fedor Katurov 2022-01-07 18:32:22 +07:00
parent 88f8fe21f7
commit 558e8f8a4f
211 changed files with 7131 additions and 10318 deletions

View file

@ -1,5 +1,4 @@
import useSWRInfinite from 'swr/infinite';
import { KeyLoader } from 'swr';
import useSWRInfinite, { SWRInfiniteKeyLoader } from 'swr/infinite';
import { GetLabNodesRequest, ILabNode } from '~/types/lab';
import { getLabNodes } from '~/api/lab';
import { flatten, last, uniqBy } from 'ramda';
@ -8,7 +7,7 @@ import { useCallback, useEffect } from 'react';
import { INode } from '~/redux/types';
import { useUser } from '~/hooks/user/userUser';
const getKey: (isUser: boolean) => KeyLoader<ILabNode[]> = isUser => (index, prev) => {
const getKey: (isUser: boolean) => SWRInfiniteKeyLoader = isUser => (index, prev: ILabNode[]) => {
if (!isUser) return null;
if (index > 0 && !prev?.length) return null;