From 11b93f1a25c722acdc924996fe83413cf6b7702c Mon Sep 17 00:00:00 2001 From: yangdx Date: Sun, 6 Apr 2025 14:57:21 +0800 Subject: [PATCH] Fix linting --- lightrag_webui/src/components/graph/GraphLabels.tsx | 6 +++--- lightrag_webui/src/hooks/useLightragGraph.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lightrag_webui/src/components/graph/GraphLabels.tsx b/lightrag_webui/src/components/graph/GraphLabels.tsx index 3bfe0024..29ff798e 100644 --- a/lightrag_webui/src/components/graph/GraphLabels.tsx +++ b/lightrag_webui/src/components/graph/GraphLabels.tsx @@ -13,7 +13,7 @@ const GraphLabels = () => { const label = useSettingsStore.use.queryLabel() const allDatabaseLabels = useGraphStore.use.allDatabaseLabels() const labelsFetchAttempted = useGraphStore.use.labelsFetchAttempted() - + // Remove initial label fetch effect as it's now handled by fetchGraph based on lastSuccessfulQueryLabel const getSearchEngine = useCallback(() => { @@ -59,8 +59,8 @@ const GraphLabels = () => { // Show queryLabel validation status useEffect(() => { - - if (labelsFetchAttempted) { + + if (labelsFetchAttempted) { if (allDatabaseLabels.length > 1) { if (label && label !== '*' && !allDatabaseLabels.includes(label)) { console.log(`Label "${label}" not in available labels`); diff --git a/lightrag_webui/src/hooks/useLightragGraph.tsx b/lightrag_webui/src/hooks/useLightragGraph.tsx index af6810e7..12bbea8f 100644 --- a/lightrag_webui/src/hooks/useLightragGraph.tsx +++ b/lightrag_webui/src/hooks/useLightragGraph.tsx @@ -119,7 +119,7 @@ const fetchGraph = async (label: string, maxDepth: number, maxNodes: number) => // Continue with graph fetch even if labels fetch fails } } - + // Trigger GraphLabels component to check if the label is valid // console.log('Setting labelsFetchAttempted to true'); useGraphStore.getState().setLabelsFetchAttempted(true)