mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed dots on lab and flow
This commit is contained in:
parent
2395c9fbab
commit
2160f50711
3 changed files with 20 additions and 14 deletions
|
@ -8,15 +8,26 @@ import { useFlowStore } from '~/store/flow/useFlowStore';
|
|||
|
||||
export const useFlow = () => {
|
||||
const { loadMore, isSyncing } = useFlowLoader();
|
||||
const labStats = useGetLabStats();
|
||||
|
||||
const { nodes, heroes, recent, updated } = useFlowStore();
|
||||
const { isFluid, toggleLayout } = useFlowLayout();
|
||||
const lab = useGetLabStats();
|
||||
|
||||
const updates = useMemo(() => [...updated, ...lab.updates].slice(0, 10), [lab.updates, updated]);
|
||||
const updates = useMemo(
|
||||
() => [...updated, ...lab.updates].slice(0, 10),
|
||||
[lab.updates, updated],
|
||||
);
|
||||
|
||||
const onChangeCellView = useFlowSetCellView();
|
||||
|
||||
const hasLabUpdates = useMemo(
|
||||
() => labStats.updates.length > 0,
|
||||
[labStats.updates],
|
||||
);
|
||||
|
||||
const hasFlowUpdates = useMemo(() => updated.length > 0, [updated]);
|
||||
|
||||
return {
|
||||
nodes,
|
||||
heroes,
|
||||
|
@ -27,5 +38,7 @@ export const useFlow = () => {
|
|||
onChangeCellView,
|
||||
loadMore,
|
||||
isSyncing,
|
||||
hasLabUpdates,
|
||||
hasFlowUpdates,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue