Skip to content

Commit

Permalink
bugfix: fix missing condition to open disconnect modal when backend i…
Browse files Browse the repository at this point in the history
…s down (#2993)

🐛 (App.tsx): Fix logic to correctly display error modal when health data is missing or not "ok"
🔧 (use-get-health.ts): Disable retry option in useGetHealthQuery to prevent unnecessary refetching of health data
  • Loading branch information
Cristhianzl authored Jul 26, 2024
1 parent 1935d38 commit ac77cee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default function App() {
message={FETCH_ERROR_MESSAGE}
openModal={
isErrorHealth ||
!healthData ||
(healthData &&
Object.values(healthData).some((value) => value !== "ok"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const useGetHealthQuery: useQueryFunctionType<
const queryResult = query(["useGetHealthQuery"], getHealthFn, {
placeholderData: keepPreviousData,
refetchInterval: 20000,
retry: false,
...options,
});

Expand Down

0 comments on commit ac77cee

Please sign in to comment.