1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

refactored flow page

This commit is contained in:
Fedor Katurov 2021-11-06 19:48:07 +07:00
parent 93a1d4104b
commit 0b77e87778
10 changed files with 182 additions and 88 deletions

34
src/pages/index.tsx Normal file
View file

@ -0,0 +1,34 @@
import React, { FC } from 'react';
import { FlowLayout } from '~/layouts/FlowLayout';
import { useFlow } from '~/utils/hooks/flow/useFlow';
import { useSearch } from '~/utils/hooks/search/useSearch';
import { useUser } from '~/utils/hooks/user/userUser';
interface Props {}
const FlowPage: FC<Props> = () => {
const { updates, nodes, heroes, recent, isFluid, toggleLayout, onChangeCellView } = useFlow();
const user = useUser();
const { search, onSearchLoadMore, onSearchChange } = useSearch();
return (
<FlowLayout
updates={updates}
recent={recent}
heroes={heroes}
nodes={nodes}
user={user}
isFluid={isFluid}
onToggleLayout={toggleLayout}
onChangeCellView={onChangeCellView}
searchResults={search.results}
searchText={search.text}
searchTotal={search.total}
searchIsLoading={search.is_loading}
onSearchLoadMore={onSearchLoadMore}
onSearchChange={onSearchChange}
/>
);
};
export default FlowPage;