-
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.
Retool form post so error response doesn't get lost. Display error on…
… Error page.
- Loading branch information
Showing
3 changed files
with
35 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
import React from 'react' | ||
import StandardLayout from './StandardLayout' | ||
import ErrorImage from '../assets/images/error-lolcat-problemz.jpg' | ||
import { useLocation } from 'react-router-dom' | ||
|
||
const Error = () => ( | ||
<> | ||
<h1>An Error Has Occurred</h1> | ||
export default function Error() { | ||
const { state } = useLocation() | ||
return ( | ||
<> | ||
<h1>An Error Has Occurred</h1> | ||
|
||
<p>Well this is embarrassing, we're working on it right meow!</p> | ||
<p>Well this is embarrassing, we're working on it right meow!</p> | ||
|
||
<img alt="" src={ErrorImage} /> | ||
</> | ||
) | ||
<img alt="" src={ErrorImage} /> | ||
|
||
<p style={{ marginTop: 30 }}>Error: {state.message}</p> | ||
</> | ||
) | ||
} | ||
|
||
export const ErrorPage = () => ( | ||
<StandardLayout> | ||
<Error /> | ||
</StandardLayout> | ||
) | ||
|
||
export default Error |
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