Skip to content

Commit b7ed8ff

Browse files
authored
[feat] 404페이지 구현 (#119)
* [feat] 404페이지 작업 완료 * [fix] 버튼 색 및 router 메인으로 변경
1 parent 33fa2ed commit b7ed8ff

File tree

3 files changed

+43
-3
lines changed

3 files changed

+43
-3
lines changed

src/app/not-found.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
function notfound() {
2-
return <div>notfound</div>;
1+
import NotFoundCont from '@/domains/not-found/components/NotFoundCont';
2+
3+
function NotFound() {
4+
return (
5+
<div className="page-layout max-w-1024 flex-center">
6+
<NotFoundCont />
7+
</div>
8+
);
39
}
4-
export default notfound;
10+
export default NotFound;
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
'use client';
2+
3+
import Image from 'next/image';
4+
import CrySsury from '@/shared/assets/ssury/ssury_cry.webp';
5+
import Button from '@/shared/components/button/Button';
6+
import { useRouter } from 'next/navigation';
7+
8+
function NotFoundCont() {
9+
const router = useRouter();
10+
11+
return (
12+
<div className="flex flex-col items-center gap-5">
13+
<Image
14+
src={CrySsury}
15+
alt=""
16+
aria-hidden
17+
width={128}
18+
height={128}
19+
className="w-25 h-25 sm:w-32 sm:h-32"
20+
/>
21+
<h1 className="text-center">페이지를 찾을 수 없어요🥲</h1>
22+
<Button
23+
type="button"
24+
color="default"
25+
onClick={() => {
26+
router.push('/');
27+
}}
28+
>
29+
메인으로 이동
30+
</Button>
31+
</div>
32+
);
33+
}
34+
export default NotFoundCont;
-172 KB
Loading

0 commit comments

Comments
 (0)