fix: fetch llm list by @tanstack/react-query #1306 (#1708)

### What problem does this PR solve?

fix: fetch llm list by @tanstack/react-query #1306

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-07-25 18:06:39 +08:00
committed by GitHub
parent a99d19bdea
commit 375f621405
10 changed files with 170 additions and 207 deletions

View File

@ -1,6 +1,5 @@
import { useSetModalState } from '@/hooks/common-hooks';
import { useFetchFlow, useResetFlow, useSetFlow } from '@/hooks/flow-hooks';
import { useFetchLlmList } from '@/hooks/llm-hooks';
import { IGraph } from '@/interfaces/database/flow';
import { useIsFetching } from '@tanstack/react-query';
import React, {
@ -283,8 +282,6 @@ export const useFetchDataOnMount = () => {
useWatchGraphChange();
useFetchLlmList();
useEffect(() => {
refetch();
}, [refetch]);