Merge pull request #691 from LAION-AI/675-bug-link-on-error-page

Updating the 404 and 500 pages to provide a link to github issues
This commit is contained in:
AbdBarho
2023-01-14 07:06:47 +01:00
committed by GitHub
2 changed files with 50 additions and 1 deletions
+18 -1
View File
@@ -1,4 +1,7 @@
import { Button, Link, Stack } from "@chakra-ui/react";
import Head from "next/head";
import NextLink from "next/link";
import { FiAlertTriangle } from "react-icons/fi";
export default function Error() {
return (
@@ -8,7 +11,21 @@ export default function Error() {
<meta name="404" content="Sorry, this page doesn't exist." />
</Head>
<main className="flex h-3/4 items-center justify-center overflow-hidden subpixel-antialiased text-xl">
<p>Sorry, the page you are looking for does not exist.</p>
<Stack>
<p>Sorry, the page you are looking for does not exist.</p>
<p>If you were trying to contribute data but ended up here, please file a bug</p>
<Button leftIcon={<FiAlertTriangle className="text-blue-500" aria-hidden="true" />} variant="solid">
<Link
as={NextLink}
key="Report a Bug"
href="https://github.com/LAION-AI/Open-Assistant/issues/new/choose"
aria-label="Report a Bug"
className="flex items-center"
>
Report a Bug
</Link>
</Button>
</Stack>
</main>
</>
);
+32
View File
@@ -0,0 +1,32 @@
import { Button, Link, Stack } from "@chakra-ui/react";
import Head from "next/head";
import NextLink from "next/link";
import { FiAlertTriangle } from "react-icons/fi";
export default function Error() {
return (
<>
<Head>
<title>500 - Open Assistant</title>
<meta name="404" content="Sorry, this page doesn't exist." />
</Head>
<main className="flex h-3/4 items-center justify-center overflow-hidden subpixel-antialiased text-xl">
<Stack>
<p>Sorry, We encountered a server error. We&apos;re not sure what went wrong</p>
<p>Please file a but below and describe what you were trying to accomplish</p>
<Button leftIcon={<FiAlertTriangle className="text-blue-500" aria-hidden="true" />} variant="solid">
<Link
as={NextLink}
key="Report a Bug"
href="https://github.com/LAION-AI/Open-Assistant/issues/new/choose"
aria-label="Report a Bug"
className="flex items-center"
>
Report a Bug
</Link>
</Button>
</Stack>
</main>
</>
);
}