diff --git a/webapp/src/components/GeneratedQuestionsList.js b/webapp/src/components/GeneratedQuestionsList.js index f5861d54..4411171b 100644 --- a/webapp/src/components/GeneratedQuestionsList.js +++ b/webapp/src/components/GeneratedQuestionsList.js @@ -31,7 +31,7 @@ const GeneratedQuestionsList = ({setError}) => { }; fetchQuestions(); - }, [apiEndpoint]); + }, [apiEndpoint, setError]); const handleSort = (column) => { if (sortColumn === column) { diff --git a/webapp/src/components/RankingList.js b/webapp/src/components/RankingList.js index 7ba00ec9..ca8b5642 100644 --- a/webapp/src/components/RankingList.js +++ b/webapp/src/components/RankingList.js @@ -32,7 +32,7 @@ const RankingList = ({setError}) => { }; fetchUsers(); - }, [apiEndpoint]); + }, [apiEndpoint, setError]); const sortedUsers = [...listUsers].sort((a, b) => { if (sortColumn === 'username') { diff --git a/webapp/src/components/RecordList.js b/webapp/src/components/RecordList.js index da88832f..3ed39bbd 100644 --- a/webapp/src/components/RecordList.js +++ b/webapp/src/components/RecordList.js @@ -26,7 +26,7 @@ const RecordList = ({ username, setError }) => { }; fetchRecords(); - }, [apiEndpoint, username]); + }, [apiEndpoint, username, setError]); return (