-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathError.tsx
55 lines (53 loc) · 1.64 KB
/
Error.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { LinkExternal02 } from "@untitled-ui/icons-react";
// eslint-disable-next-line import/no-restricted-paths
import { Header } from "../features/header/components/header";
import { PageContainer } from "./page-container";
import { EmptyState } from "./empty-state";
import { IllustrationAlert, LinkButton } from "@stacklok/ui-kit";
import { emptyStateStrings } from "@/constants/empty-state-strings";
import { hrefs } from "@/lib/hrefs";
export function ErrorFallbackContent() {
return (
<PageContainer>
<div className="py-20 flex flex-col items-center">
<EmptyState
title={emptyStateStrings.title.anErrorOccurred}
body={emptyStateStrings.body.errorDesc}
illustration={IllustrationAlert}
actions={[
<LinkButton
key="discord"
variant="secondary"
href={hrefs.external.discord}
rel="noopener noreferrer"
target="_blank"
>
Discord
<LinkExternal02 />
</LinkButton>,
<LinkButton
key="github-issues"
variant="secondary"
href={hrefs.external.github.newIssue}
rel="noopener noreferrer"
target="_blank"
>
Github issues
<LinkExternal02 />
</LinkButton>,
]}
/>
</div>
</PageContainer>
);
}
export function Error() {
return (
<div className="w-screen h-screen flex flex-col items-center justify-center">
<div className="shrink-0 w-full">
<Header />
</div>
<ErrorFallbackContent />
</div>
);
}