Skip to content

Commit

Permalink
Added the 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
codeaid committed May 26, 2024
1 parent f0d4e0b commit 08cc76c
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { NotFoundOverlay } from 'components';

const NotFoundPage = () => <NotFoundOverlay>Page not found</NotFoundOverlay>;

export default NotFoundPage;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/components/NotFoundOverlay/NotFoundOverlay.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.NotFoundOverlay {
margin: 5% 1rem 1rem;
text-align: center;
user-select: none;
}

.NotFoundOverlayImage {
border-radius: 100%;
height: auto;
max-width: 100%;
}

.NotFoundOverlayText {
margin-top: 1rem;
}
18 changes: 18 additions & 0 deletions src/components/NotFoundOverlay/NotFoundOverlay.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Image from 'next/image';
import type { PropsWithChildren } from 'react';
import image from './NotFoundOverlay.image.png';
import styles from './NotFoundOverlay.module.css';

export const NotFoundOverlay = (props: PropsWithChildren) => (
<div className={styles.NotFoundOverlay}>
<Image
alt="Not Found"
className={styles.NotFoundOverlayImage}
draggable={false}
height={400}
src={image}
width={400}
/>
<h3 className={styles.NotFoundOverlayText}>{props.children}</h3>
</div>
);
1 change: 1 addition & 0 deletions src/components/NotFoundOverlay/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'components/NotFoundOverlay/NotFoundOverlay';
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export * from './InfoSection';
export * from './Input';
export * from './Layout';
export * from './NavigationRail';
export * from './NotFoundOverlay';
export * from './Option';
export * from './ReserveFishGrid';
export * from './ReserveInfo';
Expand Down

0 comments on commit 08cc76c

Please sign in to comment.