mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
added nextjs flow preloading
This commit is contained in:
parent
6f161d12ff
commit
1f296e9ed8
6 changed files with 90 additions and 66 deletions
|
@ -8,16 +8,13 @@ import { FlowStamp } from '~/containers/flow/FlowStamp';
|
|||
import { SidebarRouter } from '~/containers/main/SidebarRouter';
|
||||
import { useUser } from '~/hooks/auth/useUser';
|
||||
import { useInfiniteLoader } from '~/hooks/dom/useInfiniteLoader';
|
||||
import { useFlowContext } from '~/utils/context/FlowContextProvider';
|
||||
import { useFlowContext } from '~/utils/providers/FlowProvider';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface Props {
|
||||
isFluid: boolean;
|
||||
onToggleLayout: () => void;
|
||||
}
|
||||
interface Props {}
|
||||
|
||||
const FlowLayout: FC<Props> = ({ isFluid, onToggleLayout }) => {
|
||||
const FlowLayout: FC<Props> = () => {
|
||||
const { heroes, nodes, onChangeCellView, loadMore, isSyncing } = useFlowContext();
|
||||
const { user } = useUser();
|
||||
|
||||
|
@ -31,7 +28,7 @@ const FlowLayout: FC<Props> = ({ isFluid, onToggleLayout }) => {
|
|||
</div>
|
||||
|
||||
<div className={styles.stamp}>
|
||||
<FlowStamp isFluid={isFluid} onToggleLayout={onToggleLayout} />
|
||||
<FlowStamp isFluid={false} onToggleLayout={console.warn} />
|
||||
</div>
|
||||
|
||||
<FlowGrid nodes={nodes} user={user} onChangeCellView={onChangeCellView} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue