bugfix: fix missing condition to open disconnect modal when backend is 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
This commit is contained in:
parent
1935d38bc4
commit
ac77cee699
2 changed files with 2 additions and 0 deletions
|
|
@ -137,6 +137,7 @@ export default function App() {
|
|||
message={FETCH_ERROR_MESSAGE}
|
||||
openModal={
|
||||
isErrorHealth ||
|
||||
!healthData ||
|
||||
(healthData &&
|
||||
Object.values(healthData).some((value) => value !== "ok"))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ export const useGetHealthQuery: useQueryFunctionType<
|
|||
const queryResult = query(["useGetHealthQuery"], getHealthFn, {
|
||||
placeholderData: keepPreviousData,
|
||||
refetchInterval: 20000,
|
||||
retry: false,
|
||||
...options,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue