From 7d06ffa9afcb790cc5e5a3667ac3b3c39a2f4fea Mon Sep 17 00:00:00 2001 From: Cay Henning Date: Tue, 28 Nov 2023 11:33:30 -0500 Subject: [PATCH] Remove retry: false --- src/components/my-widgets-collaborate-dialog.jsx | 1 - src/components/my-widgets-page.jsx | 2 -- src/components/my-widgets-score-semester-individual.jsx | 1 - src/components/my-widgets-selected-instance.jsx | 1 - src/components/notifications.jsx | 1 - src/components/scores.jsx | 2 -- src/components/student-search.jsx | 1 - src/components/support-selected-instance.jsx | 1 - 8 files changed, 10 deletions(-) diff --git a/src/components/my-widgets-collaborate-dialog.jsx b/src/components/my-widgets-collaborate-dialog.jsx index 5df7ad2ae..ba5311a95 100644 --- a/src/components/my-widgets-collaborate-dialog.jsx +++ b/src/components/my-widgets-collaborate-dialog.jsx @@ -54,7 +54,6 @@ const MyWidgetsCollaborateDialog = ({onClose, inst, myPerms, otherUserPerms, set queryFn: () => apiSearchUsers(debouncedSearchTerm), staleTime: Infinity, placeholderData: [], - retry: false, onError: (err) => { if (err.message == "Invalid Login") { diff --git a/src/components/my-widgets-page.jsx b/src/components/my-widgets-page.jsx index 5ba00b42b..c6af43c5a 100644 --- a/src/components/my-widgets-page.jsx +++ b/src/components/my-widgets-page.jsx @@ -57,7 +57,6 @@ const MyWidgetsPage = () => { queryKey: 'user', queryFn: apiGetUser, staleTime: Infinity, - retry: false, onError: (err) => { if (err.message == "Invalid Login") { @@ -80,7 +79,6 @@ const MyWidgetsPage = () => { enabled: !!state.selectedInst && !!state.selectedInst.id && state.selectedInst?.id !== undefined, placeholderData: null, staleTime: Infinity, - retry: false, onError: (err) => { if (err.message == "Invalid Login") { setInvalidLogin(true) diff --git a/src/components/my-widgets-score-semester-individual.jsx b/src/components/my-widgets-score-semester-individual.jsx index 1cd338db0..12a19947a 100644 --- a/src/components/my-widgets-score-semester-individual.jsx +++ b/src/components/my-widgets-score-semester-individual.jsx @@ -36,7 +36,6 @@ const MyWidgetScoreSemesterIndividual = ({ semester, instId, setInvalidLogin }) enabled: !!instId && !!semester && !!semester.term && !!semester.year, placeholderData: [], refetchOnWindowFocus: false, - retry: false, onSuccess: (result) => { if (page <= result?.total_num_pages) setPage(page + 1) if (result && result.pagination) { diff --git a/src/components/my-widgets-selected-instance.jsx b/src/components/my-widgets-selected-instance.jsx index 6facdebf7..fa2a26eac 100644 --- a/src/components/my-widgets-selected-instance.jsx +++ b/src/components/my-widgets-selected-instance.jsx @@ -80,7 +80,6 @@ const MyWidgetSelectedInstance = ({ placeholderData: null, enabled: !!inst.id, staleTime: Infinity, - retry: false, onError: (err) => { if (err.message == "Invalid Login") { diff --git a/src/components/notifications.jsx b/src/components/notifications.jsx index a59b72b66..d66b3cd2f 100644 --- a/src/components/notifications.jsx +++ b/src/components/notifications.jsx @@ -20,7 +20,6 @@ const Notifications = (user) => { const { data: notifications} = useQuery({ queryKey: 'notifications', enabled: !!user && user.loggedIn, - retry: false, refetchInterval: 60000, refetchOnMount: false, refetchOnWindowFocus: true, diff --git a/src/components/scores.jsx b/src/components/scores.jsx index 97eb194f6..1dd1d5bf3 100644 --- a/src/components/scores.jsx +++ b/src/components/scores.jsx @@ -98,7 +98,6 @@ const Scores = ({ inst_id, play_id, single_id, send_token, isEmbedded, isPreview queryFn: () => apiGetGuestWidgetInstanceScores(inst_id, guestPlayId), enabled: false, // enabled is set to false so the query can be manually called with the refetch function staleTime: Infinity, - retry: false, refetchOnWindowFocus: false, onSuccess: (result) => { _populateScores(result) @@ -119,7 +118,6 @@ const Scores = ({ inst_id, play_id, single_id, send_token, isEmbedded, isPreview queryFn: () => apiGetWidgetInstancePlayScores(playId, previewInstId), staleTime: Infinity, enabled: (!!playId || !!previewInstId), - retry: false, refetchOnWindowFocus: false, onError: (err) => { if (err.message == "Invalid Login") { diff --git a/src/components/student-search.jsx b/src/components/student-search.jsx index eb93f416f..6cd514ede 100644 --- a/src/components/student-search.jsx +++ b/src/components/student-search.jsx @@ -17,7 +17,6 @@ const StudentSearch = ({addUser, debounceTime=300, setError}) => { placeholderData: [], enabled: !!debouncedSearchTerm && debouncedSearchTerm.length > 0, staleTime: Infinity, - retry: false, onError: (err) => { if (err.message == "Invalid Login") { window.location.href = '/login' diff --git a/src/components/support-selected-instance.jsx b/src/components/support-selected-instance.jsx index e9296536e..a8c975f3a 100644 --- a/src/components/support-selected-instance.jsx +++ b/src/components/support-selected-instance.jsx @@ -74,7 +74,6 @@ const SupportSelectedInstance = ({inst, currentUser, embed = false}) => { enabled: !!inst && inst.id !== undefined, placeholderData: null, staleTime: Infinity, - retry: false, onError: (err) => { if (err.message == "Invalid Login") { setInvalidLogin(true)