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:
parent
88f8fe21f7
commit
558e8f8a4f
211 changed files with 7131 additions and 10318 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue