diff --git a/frontend/nextjs/app/page.tsx b/frontend/nextjs/app/page.tsx index 1018a6bd7..97f028f3d 100644 --- a/frontend/nextjs/app/page.tsx +++ b/frontend/nextjs/app/page.tsx @@ -308,7 +308,7 @@ export default function Home() { } else if (data.type === 'langgraphButton') { const uniqueKey = `langgraphButton-${index}`; return ( -
+
//
// { const [files, setFiles] = useState([]); const host = getHost(); - - const fetchFiles = async () => { + + const fetchFiles = useCallback(async () => { try { const response = await axios.get(`${host}/files/`); setFiles(response.data.files); } catch (error) { console.error('Error fetching files:', error); } - }; + }, [host]); useEffect(() => { fetchFiles(); - }, []); + }, [fetchFiles]); const onDrop = async (acceptedFiles) => { const formData = new FormData(); @@ -63,9 +63,9 @@ const FileUpload = () => {
  • {file}