Skip to content

Commit

Permalink
Merge pull request #7 from noworneverev/deployment/fix-dependencies
Browse files Browse the repository at this point in the history
Delete unused states
  • Loading branch information
noworneverev authored Aug 10, 2024
2 parents d4b5fef + 6cd8725 commit e24da62
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/app/components/GraphViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
const [apiSearchResults, setApiSearchResults] = useState<SearchResult | null>(
null
);
const [loading, setLoading] = useState<boolean>(false);
const [error, setError] = useState<string | null>(null);

const [graphData, setGraphData] = useState<CustomGraphData>(data);

const initialGraphData = useRef<CustomGraphData>(data);
Expand All @@ -127,8 +126,6 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
query: string,
searchType: "local" | "global"
) => {
setLoading(true);
setError(null);
try {
const data: SearchResult =
searchType === "local"
Expand All @@ -140,9 +137,7 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
updateGraphData(data.context_data);
} catch (err) {
console.error("An error occurred during the API search.", err);
setError("An error occurred during the API search.");
} finally {
setLoading(false);
}
};

Expand Down

0 comments on commit e24da62

Please sign in to comment.