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:
parent
93a1d4104b
commit
0b77e87778
10 changed files with 182 additions and 88 deletions
34
src/pages/index.tsx
Normal file
34
src/pages/index.tsx
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue