-
-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(frontend): custom 404 + error page with intl formatting * style(frontend): add styling for error message
- Loading branch information
Showing
5 changed files
with
132 additions
and
20 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,39 @@ | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
import { defineMessages, FormattedMessage } from 'react-intl'; | ||
|
||
const messages = defineMessages({ | ||
pageNotFound: '404 - Page Not Found', | ||
returnHome: 'Return Home', | ||
}); | ||
|
||
const Custom404: React.FC = () => { | ||
return ( | ||
<div className="error-message"> | ||
<div className="text-4xl"> | ||
<FormattedMessage {...messages.pageNotFound} /> | ||
</div> | ||
<Link href="/"> | ||
<a className="flex"> | ||
<FormattedMessage {...messages.returnHome} /> | ||
<svg | ||
className="w-6 h-6 ml-2" | ||
fill="none" | ||
stroke="currentColor" | ||
viewBox="0 0 24 24" | ||
xmlns="http:https://www.w3.org/2000/svg" | ||
> | ||
<path | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={2} | ||
d="M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z" | ||
/> | ||
</svg> | ||
</a> | ||
</Link> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Custom404; |
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