1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

added useMemos to get data hooks

This commit is contained in:
Fedor Katurov 2022-01-09 19:28:23 +07:00
parent 1904153bba
commit d9feff085a
11 changed files with 49 additions and 19 deletions

View file

@ -7,6 +7,7 @@ import classNames from 'classnames';
import { FlowSwiperHero } from '~/components/flow/FlowSwiperHero';
import { useFlowContext } from '~/utils/context/FlowContextProvider';
import { useUser } from '~/hooks/auth/useUser';
import { useInfiniteLoader } from '~/hooks/dom/useInfiniteLoader';
interface Props {
isFluid: boolean;
@ -14,9 +15,11 @@ interface Props {
}
const FlowLayout: FC<Props> = ({ isFluid, onToggleLayout }) => {
const { heroes, nodes, onChangeCellView } = useFlowContext();
const { heroes, nodes, onChangeCellView, loadMore, isSyncing } = useFlowContext();
const { user } = useUser();
useInfiniteLoader(loadMore, isSyncing);
return (
<div className={classNames(styles.container)}>
<div className={styles.grid}>