Skip to content

Commit

Permalink
feat(404.tsx) : 완성
Browse files Browse the repository at this point in the history
  • Loading branch information
ayden94 committed Jan 5, 2024
1 parent 6140657 commit 62440b4
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 16 deletions.
1 change: 0 additions & 1 deletion components/Table/TableList/TableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import sender from "@/apis/sender";
import Button from "@/components/Buttons/Button/Button";
import ProfileIcon from "@/components/Members/ProfileIcon";
import useApi from "@/hooks/useApi";
import AlertModal from "@/modals/AlertModal";
import { InvitationData, Member } from "@/types/api.type";
import { getAccessTokenFromDocument } from "@/utils/getAccessToken";
import makeColorProfile from "@/utils/makeColorProfile";
Expand Down
15 changes: 0 additions & 15 deletions pages/404.js

This file was deleted.

16 changes: 16 additions & 0 deletions pages/404.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.root {
margin: 20rem auto;
width: 500px;
}

.h1 {
font-size: 5.6rem;
margin: 2rem auto 5rem;
text-align: center;
}

.p {
font-size: 5.6rem;
margin: 5rem auto 2rem;
text-align: center;
}
20 changes: 20 additions & 0 deletions pages/404.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// /pages/404.js
import Image from "next/image";
import Link from "next/link";
import styles from "./404.module.css";
import Button from "@/components/Buttons/Button/Button";

export default function NotFoundPage() {
return (
<div className={styles.root}>
<p className={styles.p}>길을 잃었다</p>
<Image src="/images/404.webp" width="500" height="300" alt="" />
<h1 className={styles.h1}>어딜 가야 할까</h1>
<ul>
<Button buttonType="login" color="white">
<Link href="/mydashboard">Go home</Link>
</Button>
</ul>
</div>
);
}
6 changes: 6 additions & 0 deletions pages/dashboard/[boardId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
data: { data: columnData },
} = await sender.get({ path: "columns", id: boardId, accessToken });

if (!columnData) {
return {
notFound: true,
};
}

const entireData: EntireData = {
cards: {},
columns: {},
Expand Down
Binary file added public/images/404.webp
Binary file not shown.

0 comments on commit 62440b4

Please sign in to comment.