-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: back home button on error-page (#60)
Fixes #59
- Loading branch information
Showing
2 changed files
with
13 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import { Button } from "@/components/ui/button"; | ||
import { useRouteErrorMessage } from "@/hooks/use-route-error-message"; | ||
import Page from "@/layout/page"; | ||
import { Link } from "react-router-dom"; | ||
|
||
export default function ErrorPage() { | ||
const error = useRouteErrorMessage(); | ||
console.error(error); | ||
|
||
return ( | ||
<div id="error-page"> | ||
<h1>Oops!</h1> | ||
<Page className="flex w-fit flex-col gap-4"> | ||
<p>Sorry, an unexpected error has occurred.</p> | ||
<p> | ||
<i>{error}</i> | ||
</p> | ||
</div> | ||
<Button asChild> | ||
<Link to="/" reloadDocument> | ||
Go Home | ||
</Link> | ||
</Button> | ||
</Page> | ||
); | ||
} |
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