Skip to content

Commit 5b59414

Browse files
author
bhavabhuthi
committed
feat: create a error fallback page with icon
1 parent d90a297 commit 5b59414

3 files changed

Lines changed: 41 additions & 26 deletions

File tree

components/error/error.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Icon } from 'opub-ui';
2+
3+
import { Icons } from '../icons';
4+
5+
export function ErrorPage() {
6+
return (
7+
<div className="text font-Medium flex h-[680px] w-full flex-col items-center justify-center gap-4 text-600">
8+
<Icon source={Icons.errorPage} size={100} />
9+
Error fetching information. Please try again later.
10+
</div>
11+
);
12+
}

components/error/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ErrorPage } from './error';

components/icons.tsx

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
IconDatabase,
1414
IconDatabaseCog,
1515
IconDatabaseEdit,
16+
IconDatabaseOff,
1617
IconDatabasePlus,
1718
IconDownload,
1819
IconFilePlus,
@@ -41,41 +42,42 @@ import {
4142
export const Icons: {
4243
[key: string]: React.FC<any>;
4344
} = {
44-
back: IconArrowLeft,
45-
logo: IconFolder,
46-
datasetSettings: IconDatabaseCog,
47-
datasetEdit: IconDatabaseEdit,
48-
userList: IconUsers,
49-
dataset: IconDatabase,
45+
access: IconShieldCheck,
5046
addDataset: IconDatabasePlus,
51-
userSettings: IconUserCog,
47+
alert: IconAlertCircleFilled,
5248
arrowRight: IconArrowRight,
53-
search: IconSearch,
54-
notification: IconBellFilled,
55-
info: IconInfoCircle,
56-
construction: IconBarrierBlock,
57-
link: IconLink,
49+
back: IconArrowLeft,
50+
check: IconCircleCheckFilled,
5851
collapse: IconLayoutSidebarLeftCollapse,
59-
expand: IconLayoutSidebarLeftExpand,
52+
construction: IconBarrierBlock,
53+
cross: IconX,
54+
dataset: IconDatabase,
55+
datasetEdit: IconDatabaseEdit,
56+
datasetSettings: IconDatabaseCog,
57+
delete: IconTrash,
6058
distribution: IconFilePlus,
59+
download: IconDownload,
6160
dropzone: IconCloudUpload,
62-
check: IconCircleCheckFilled,
63-
delete: IconTrash,
64-
terminal: IconTerminal,
65-
cross: IconX,
61+
errorPage: IconDatabaseOff,
62+
expand: IconLayoutSidebarLeftExpand,
63+
facebook: IconBrandFacebookFilled,
64+
fileUpload: IconFileUpload,
65+
github: IconBrandGithubFilled,
66+
info: IconInfoCircle,
67+
link: IconLink,
68+
linkedin: IconBrandLinkedin,
69+
logo: IconFolder,
6670
menu: IconMenu2,
67-
access: IconShieldCheck,
71+
notification: IconBellFilled,
6872
openAccess: IconShieldCheck,
73+
pencil: IconPencil,
74+
plus: IconPlus,
6975
registeredAccess: IconShieldStar,
7076
restrictedAccess: IconShieldLock,
77+
search: IconSearch,
7178
share: IconShare3,
72-
pencil: IconPencil,
73-
fileUpload: IconFileUpload,
74-
plus: IconPlus,
79+
terminal: IconTerminal,
7580
twitter: IconBrandTwitterFilled,
76-
facebook: IconBrandFacebookFilled,
77-
linkedin: IconBrandLinkedin,
78-
github: IconBrandGithubFilled,
79-
download: IconDownload,
80-
alert: IconAlertCircleFilled,
81+
userList: IconUsers,
82+
userSettings: IconUserCog,
8183
};

0 commit comments

Comments
 (0)