Skip to content

Commit 1d6852d

Browse files
authored
design: 알림페이지 퍼블리싱 (#10)
* design: 알림 페이지 에셋 추가 * feat: 알림 아이콘 - 알림 페이지 라우팅 연결 * design: 경고 모달창 퍼블리싱 * design: 알림 페이지 퍼블리싱 * design: 페이지 상단 간격 수정 * refactor: 레이아웃 컴포넌트 구조 수정
1 parent 9f6bb67 commit 1d6852d

File tree

16 files changed

+231
-16
lines changed

16 files changed

+231
-16
lines changed

src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Route, Routes } from 'react-router';
22

33
import useViewport from './hooks/useViewport';
4-
import Header from './layouts/Header';
4+
import Layout from './layouts/Layout';
55
import Home from './pages/Home';
66
import LetterBoardPage from './pages/LetterBoard';
77
import LetterBoardDetailPage from './pages/LetterBoardDetail';
@@ -35,7 +35,7 @@ const App = () => {
3535
<Route path="letter/:id" element={<LetterBoardDetailPage />} />
3636
<Route path="rolling/:id" element={<RollingPaperPage />} />
3737
</Route>
38-
<Route path="mypage" element={<Header />}>
38+
<Route path="mypage" element={<Layout />}>
3939
<Route index element={<MyPage />} />
4040
<Route path="notifications" element={<NotificationsPage />} />
4141
</Route>

src/assets/icons/board.svg

Lines changed: 8 additions & 0 deletions
Loading

src/assets/icons/envelope.svg

Lines changed: 8 additions & 0 deletions
Loading

src/assets/icons/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import AlarmIcon from './alarm.svg?react';
22
import ArrowLeftIcon from './arrow-left.svg?react';
3+
import BoardIcon from './board.svg?react';
4+
import EnvelopeIcon from './envelope.svg?react';
35
import PersonIcon from './person.svg?react';
6+
import SirenIcon from './siren.svg?react';
47

5-
export { AlarmIcon, PersonIcon, ArrowLeftIcon };
8+
export { AlarmIcon, PersonIcon, ArrowLeftIcon, SirenIcon, EnvelopeIcon, BoardIcon };

src/assets/icons/message.svg

Lines changed: 8 additions & 0 deletions
Loading

src/assets/icons/siren.svg

Lines changed: 8 additions & 0 deletions
Loading

src/components/ConfirmModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const ConfirmModal = ({
2121
onCancel,
2222
onConfirm,
2323
}: ConfirmModalProps) => {
24-
// TODO: 배경 이미지 삽입
2524
// TODO: 전역 상태로 관리해야하는지 고민
2625
return (
2726
<ModalOverlay>

src/layouts/.gitkeep

Whitespace-only changes.

src/layouts/Header.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
import { Outlet } from 'react-router';
1+
import { Link } from 'react-router';
22

33
import { AlarmIcon, ArrowLeftIcon, PersonIcon } from '@/assets/icons';
44

55
const Header = () => {
66
// TODO: 뒤로 가기 버튼이 보이는 조건 추가
77
// TODO: 스크롤 발생 시, 어떻게 보여져야 하는지
88
return (
9-
<>
10-
<header className="sticky top-0 flex items-center justify-between p-5">
11-
<ArrowLeftIcon className="h-6 w-6 text-white" />
12-
<div className="flex items-center gap-3">
9+
<header className="sticky top-0 flex h-16 items-center justify-between p-5">
10+
<ArrowLeftIcon className="h-6 w-6 text-white" />
11+
<div className="flex items-center gap-3">
12+
<Link to="/mypage/notifications">
1313
<AlarmIcon className="h-6 w-6 text-white" />
14-
<PersonIcon className="h-6 w-6 text-white" />
15-
</div>
16-
</header>
17-
<Outlet />
18-
</>
14+
</Link>
15+
<PersonIcon className="h-6 w-6 text-white" />
16+
</div>
17+
</header>
1918
);
2019
};
2120

src/layouts/Layout.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Outlet } from 'react-router';
2+
3+
import Header from './Header';
4+
5+
const Layout = () => {
6+
return (
7+
<>
8+
<Header />
9+
<Outlet />
10+
</>
11+
);
12+
};
13+
14+
export default Layout;

0 commit comments

Comments
 (0)