From 0e29f69c906f842253f4aef1d68db82754603e4c Mon Sep 17 00:00:00 2001 From: Lee sang Yeop Date: Fri, 2 Feb 2024 03:10:16 +0900 Subject: [PATCH 01/18] =?UTF-8?q?feat(icon):=20=EC=95=84=EC=9D=B4=EC=BD=98?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20=EC=A2=85,=20=ED=82=A4=EB=B3=B4?= =?UTF-8?q?=EB=93=9C,=20=EB=8A=90=EB=82=8C=ED=91=9C=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EC=BD=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/@types/styles/icon.ts | 5 ++++- src/components/Common/Icon/index.tsx | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/@types/styles/icon.ts b/src/@types/styles/icon.ts index 364cad69..d55fe87b 100644 --- a/src/@types/styles/icon.ts +++ b/src/@types/styles/icon.ts @@ -27,4 +27,7 @@ export type IconKind = | 'location' | 'warning' | 'account' - | 'language'; + | 'language' + | 'keyboard' + | 'exclamation' + | 'bell'; diff --git a/src/components/Common/Icon/index.tsx b/src/components/Common/Icon/index.tsx index 06c0a05e..d41b2414 100644 --- a/src/components/Common/Icon/index.tsx +++ b/src/components/Common/Icon/index.tsx @@ -30,6 +30,9 @@ import { MdOutlineKeyboardArrowDown, MdAssignmentInd, MdLanguage, + MdKeyboard, + MdError, + MdDoorbell, } from 'react-icons/md'; const ICON: { [key in IconKind]: IconType } = { @@ -62,6 +65,9 @@ const ICON: { [key in IconKind]: IconType } = { warning: MdOutlineError, account: MdAssignmentInd, language: MdLanguage, + keyboard: MdKeyboard, + exclamation: MdError, + bell: MdDoorbell, }; interface IconProps { From 8dbcb9f7a4e514a712fc1b1e7dd2022d09162bad Mon Sep 17 00:00:00 2001 From: Lee sang Yeop Date: Fri, 2 Feb 2024 03:12:55 +0900 Subject: [PATCH 02/18] =?UTF-8?q?feat(My):=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=97=90=20=EC=8B=A0=EA=B7=9C=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80=20=EC=95=8C=EB=A6=BC=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95,=20=ED=82=A4=EC=9B=8C=EB=93=9C=20=EC=95=8C=EB=A6=BC?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95,=20=EC=9E=90=EC=A3=BC=20=EB=AC=BB?= =?UTF-8?q?=EB=8A=94=20=EC=A7=88=EB=AC=B8=EC=9C=BC=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8A=94=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/My/index.tsx | 109 +++++++++++++++++++++++++---------------- 1 file changed, 66 insertions(+), 43 deletions(-) diff --git a/src/pages/My/index.tsx b/src/pages/My/index.tsx index 567dae49..40451aee 100644 --- a/src/pages/My/index.tsx +++ b/src/pages/My/index.tsx @@ -149,42 +149,55 @@ const My = () => { return ( <> - 마이페이지 - - - - {major ? ( - <> -
{major}
- {' '} - - ) : ( -
routerToMajorDecision()} - css={css` - opacity: 0.5; - width: 100%; - `} - > - 학과 선택하러가기 -
- )} -
- - 학과 공지사항 알림받기 - - -
-
+ + 마이페이지 + + {major ? ( + <> +
{major}
+ {' '} + + ) : ( +
routerToMajorDecision()} + css={css` + opacity: 0.5; + width: 100%; + `} + > + 학과 선택하러가기 +
+ )} +
+ + 학과 공지사항 알림받기 + + +
+ + 관리 + + {' '} + 알림 설정 + + routerTo('/keyword')}> + {' '} + 키워드 알림 설정 + + + {' '} + 자주 묻는 질문 + + ` - color: ${(prop) => (prop.isAvailable ? THEME.PRIMARY : THEME.TEXT.GRAY)}; - border: none; - background-color: transparent; - position: absolute; - top: 10px; - right: 10%; - - &: hover { - cursor: pointer; - } -`; From e4b1af229cc41ca96c62e23d858909258b039a33 Mon Sep 17 00:00:00 2001 From: Lee sang Yeop Date: Sat, 10 Feb 2024 14:46:52 +0900 Subject: [PATCH 18/18] =?UTF-8?q?test(My):=20My=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=EC=97=90=20toast=20=EB=A9=94=EC=84=B8?= =?UTF-8?q?=EC=A7=80=EB=A5=BC=20=EC=B6=94=EA=B0=80=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=EC=BD=94=EB=93=9C=EC=97=90=20Toasts?= =?UTF-8?q?Provier=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/My/index.test.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/My/index.test.tsx b/src/pages/My/index.test.tsx index b92eb2d8..dcd787b0 100644 --- a/src/pages/My/index.test.tsx +++ b/src/pages/My/index.test.tsx @@ -1,6 +1,7 @@ import Modal from '@components/Common/Modal'; import MajorProvider from '@components/Providers/MajorProvider'; import ModalsProvider from '@components/Providers/ModalsProvider'; +import ToastsProvider from '@components/Providers/ToastsProvider'; import { MODAL_BUTTON_MESSAGE, MODAL_MESSAGE } from '@constants/modal-messages'; import useModals from '@hooks/useModals'; import { render, screen } from '@testing-library/react'; @@ -64,7 +65,9 @@ describe('마이 페이지 동작 테스트', () => { render( - + + + , { wrapper: MemoryRouter }, @@ -72,6 +75,7 @@ describe('마이 페이지 동작 테스트', () => { const majorEditButton = screen.getByText('학과 선택하러가기'); await userEvent.click(majorEditButton); + expect(mockRouterTo).toHaveBeenCalledWith('/major-decision'); }); });