Skip to content

Commit 609af25

Browse files
committed
design: 404 페이지 디자인
- 404 페이지 퍼블리싱 - 홈으로 가는 버튼 추가
1 parent 2bea6b0 commit 609af25

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import LetterBoxDetailPage from './pages/LetterBoxDetail';
1414
import LetterDetailPage from './pages/LetterDetail';
1515
import LoginPage from './pages/Login';
1616
import MyPage from './pages/MyPage';
17+
import NotFoundPage from './pages/NotFound';
1718
import NotificationsPage from './pages/Notifications';
1819
import OnboardingPage from './pages/Onboarding';
1920
import RandomLettersPage from './pages/RandomLetters';
@@ -51,7 +52,9 @@ const App = () => {
5152
<Route path="board" element={<LetterBoardPage />} />
5253
<Route path="notifications" element={<NotificationsPage />} />
5354
</Route>
55+
<Route path="*" element={<NotFoundPage />}></Route>
5456
</Route>
57+
5558
<Route path="admin" element={<AdminPage />}>
5659
<Route path="report" element={<ReportManage />} />
5760
</Route>

src/pages/NotFound/index.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { useNavigate } from 'react-router';
2+
3+
export default function index() {
4+
// eslint-disable-next-line react-hooks/rules-of-hooks
5+
const navigate = useNavigate();
6+
return (
7+
<main className="absolute inset-0 flex h-full w-full flex-col justify-end bg-white px-5 pt-7.5 pb-4">
8+
<article className="basic-theme mt-7.5 mb-9 grow text-center">
9+
<h1 className="h3-b font-malang mt-15.5">존재하지 않는 페이지</h1>
10+
<section className="mt-23.5" style={{ fontFamily: 'KyoboHandwriting2020A' }}>
11+
<p>존재한다는 건 정말 소중한 일이에요.</p>
12+
<p>누군가에게 발견될 수 있으니 말이죠.</p>
13+
<p>마치 36.5를 통해 연결된 따숨님들처럼요.</p>
14+
<br />
15+
<p>36.5 에 존재하는 다른 페이지들이 많아요!</p>
16+
<p>여러분을 기다리고 있는 다른 페이지들을 발견해주시겠어요?</p>
17+
</section>
18+
<p className="font-malang mt-23.5">From.9황작물</p>
19+
</article>
20+
<button
21+
className="primary-btn body-sb text-gray-60 h-fit w-full py-2"
22+
onClick={() => {
23+
navigate(`/`);
24+
}}
25+
>
26+
집으로 돌아가기
27+
</button>
28+
</main>
29+
);
30+
}

0 commit comments

Comments
 (0)