-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert '404' page to App Router [#134]
Note: file renaming (`404.jsx` -> `not-found.tsx`) is because Next.js App Router requires the latter name. Note: old `pages/404.jsx` and `src/pages/404.jsx` are left in place because the `ListResources` component depends on the `ErrorContainer` style being exported from them. This will be addressed in a subsequent commit.
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ReactElement } from "react"; | ||
|
||
import Splash from "../components/splash"; | ||
import styles from "./styles/not-found.module.css"; | ||
|
||
export default function FourOhFour(): ReactElement { | ||
return ( | ||
<> | ||
<div className={styles.errorContainer}> | ||
Oops - that page doesn’t exist! (404). | ||
<br /> | ||
Here’s the splash page instead… | ||
</div> | ||
|
||
<Splash /> | ||
</> | ||
); | ||
} |
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
|
||
--blue: #5097ba; | ||
--darkGrey: #333; | ||
--errorRed: #DE3C26; | ||
--mediumGrey: #888; | ||
--lightGrey: #ccc; | ||
|
||
|
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,10 @@ | ||
.errorContainer { | ||
color: var(--errorRed); | ||
font-size: 28px; | ||
font-weight: 300; | ||
line-height: calc(1.4 * var(--niceLineHeight)); | ||
margin: 0 auto; | ||
max-width: 640px; | ||
padding: 130px 0 80px; | ||
text-align: center; | ||
} |