-
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.
- Loading branch information
1 parent
ba18af1
commit 375dd00
Showing
9 changed files
with
314 additions
and
204 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,19 +1,40 @@ | ||
import { useRouteError } from "react-router-dom"; | ||
import "./error.css"; | ||
|
||
export default function ErrorPage() { | ||
let error = useRouteError(); | ||
document.title = "Oops! " + error.status; | ||
return ( | ||
<> | ||
<a href="/">Startseite</a> | ||
|
||
<h1>Es ist ein Fehler aufgetreten...</h1> | ||
|
||
<h2>{error.status}</h2> | ||
<b>{error.statusText}</b> | ||
<p /> | ||
<p /> | ||
{error.data} | ||
<p /> | ||
</> | ||
<div className="error-container"> | ||
<div className="error-content"> | ||
<div className="error-message"> | ||
<h2> | ||
Fehler{" "} | ||
<span style={{ fontFamily: "monospace", fontSize: "70px" }}> | ||
{error.status} | ||
</span> | ||
</h2> | ||
<b>{error.statusText || "Unbekannter Fehler"}</b> | ||
<p> | ||
Leider ist ein unerwarteter Fehler aufgetreten.{" "} | ||
{error.status >= 400 && error.status < 500 | ||
? "Es scheint, dass der Fehler auf Ihrer Seite liegt." | ||
: "Wir arbeiten daran, das Problem zu beheben."} | ||
</p> | ||
<div className="error-button" onClick={() => window.history.back()}> | ||
Zurück | ||
</div> | ||
</div> | ||
<div className="error-details"> | ||
<p> | ||
Wenn Sie möchten, können Sie helfen, den Fehler zu beheben, indem | ||
Sie die folgenden Informationen per Mail weiterleiten: | ||
</p> | ||
<div className="error-stacktrace"> | ||
{JSON.stringify(error, null, 2)} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.