-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added handling of network errors & network error page
- Loading branch information
1 parent
3ef32d2
commit f917e6b
Showing
6 changed files
with
67 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
apps/kyb-app/src/common/components/organisms/ErrorScreen/ServerNotAvailable.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { AppErrorScreen } from '../../molecules/AppErrorScreen'; | ||
|
||
export const ServerNotAvailableErrorScreen = () => { | ||
return ( | ||
<AppErrorScreen | ||
title="Server Not Available" | ||
description={ | ||
<div className="!text-muted-foreground flex flex-col gap-1"> | ||
<p>We are unable to connect to our servers at this time.</p> | ||
<p>This could be due to maintenance or temporary technical difficulties.</p> | ||
<ul> | ||
<li> | ||
<b>1.</b> Please wait a few minutes and try refreshing the page | ||
</li> | ||
<li> | ||
<b>2.</b> Check your internet connection | ||
</li> | ||
<li> | ||
<b>3.</b> If the problem persists, our servers may be undergoing maintenance. Please | ||
try again later or contact support | ||
</li> | ||
</ul> | ||
</div> | ||
} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export class ServerNotAvailableError extends Error { | ||
constructor() { | ||
super('Server not available'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters