Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Underline Fixed (191) * ErrorPage.tsx * Updated ErrorPage to pass lint. * Updated changes based on To's feedback. * Updated based on lint.
- Loading branch information
Showing
4 changed files
with
28 additions
and
3 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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, { FC } from "react"; | ||
import { useHistory } from "react-router-dom"; | ||
|
||
interface ErrorPageProps { | ||
error?: any; | ||
} | ||
|
||
const ErrorPage: FC<ErrorPageProps> = ({ error }: ErrorPageProps) => { | ||
const history = useHistory(); | ||
const errorText = error ? error.toString() : ""; | ||
|
||
return ( | ||
<div> | ||
<h1 className="mzp-u-title-sm">Sorry, we can’t find that page.</h1> | ||
<p>{errorText}</p> | ||
<button className="mzp-c-button mzp-t-secondary mzp-t-md" onClick={() => history.goBack()}> | ||
Back | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ErrorPage; |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as ErrorPage } from "./ErrorPage"; |