Remove redundant label fetch on mount
This commit is contained in:
@@ -169,11 +169,6 @@ const useLightrangeGraph = () => {
|
|||||||
const minDegree = useSettingsStore.use.graphMinDegree()
|
const minDegree = useSettingsStore.use.graphMinDegree()
|
||||||
const isFetching = useGraphStore.use.isFetching()
|
const isFetching = useGraphStore.use.isFetching()
|
||||||
|
|
||||||
// Fetch all database labels on mount
|
|
||||||
useEffect(() => {
|
|
||||||
useGraphStore.getState().fetchAllDatabaseLabels()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
// Use ref to track fetch status
|
// Use ref to track fetch status
|
||||||
const fetchStatusRef = useRef<Record<string, boolean>>({});
|
const fetchStatusRef = useRef<Record<string, boolean>>({});
|
||||||
|
|
||||||
@@ -276,6 +271,7 @@ const useLightrangeGraph = () => {
|
|||||||
const state = useGraphStore.getState()
|
const state = useGraphStore.getState()
|
||||||
state.reset()
|
state.reset()
|
||||||
state.setSigmaGraph(new DirectedGraph())
|
state.setSigmaGraph(new DirectedGraph())
|
||||||
|
state.setGraphLabels(['*'])
|
||||||
}
|
}
|
||||||
}, [queryLabel, maxQueryDepth, minDegree, isFetching])
|
}, [queryLabel, maxQueryDepth, minDegree, isFetching])
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user