fix: add click event on button to retry check connection to backend (#2558)

♻️ (App.tsx): remove console.log statement from setRetry function
🐛 (fetchErrorComponent): add onClick handler to Retry button to ensure retry logic is executed
This commit is contained in:
Cristhian Zanforlin Lousa 2024-07-05 13:57:20 -03:00 committed by GitHub
commit e63479556c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -128,7 +128,6 @@ export default function App() {
Object.values(healthData).some((value) => value !== "ok"))
}
setRetry={() => {
console.log("retrying");
refetch();
}}
isLoadingHealth={fetchingHealth}

View file

@ -32,7 +32,13 @@ export default function FetchErrorComponent({
</BaseModal.Content>
<BaseModal.Footer
submit={{ label: "Retry", loading: isLoadingHealth }}
submit={{
label: "Retry",
loading: isLoadingHealth,
onClick: () => {
setRetry();
},
}}
/>
</BaseModal>
</>