fix(web): implement offline detection (#1065)

* xtreme connected edition

* change fallbackRender to fallbackComponent on ErrorBoundary

* call healthz endpoint when error is 500

* display custom offline message

* fix eslint indentation for switchCase

* Update ErrorPage.tsx

* check against error.cause

---------

Co-authored-by: Fabricio Silva <hi@fabricio.dev>
This commit is contained in:
Kyle Sanderson 2023-09-10 08:39:58 -07:00 committed by GitHub
parent d187daa566
commit a1a16adbab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 25 deletions

View file

@ -22,7 +22,7 @@ const queryClient = new QueryClient({
// delay = Math.min(1000 * 2 ** attemptIndex, 30000)
retry: true,
useErrorBoundary: true,
suspense: true,
suspense: true
},
mutations: {
onError: (error) => {
@ -47,7 +47,7 @@ export function App() {
return (
<ErrorBoundary
onReset={reset}
fallbackRender={ErrorPage}
FallbackComponent={ErrorPage}
>
<QueryClientProvider client={queryClient}>
<Portal>