diff --git a/src/app/result/page.tsx b/src/app/result/page.tsx index d7440fa..301ae0a 100644 --- a/src/app/result/page.tsx +++ b/src/app/result/page.tsx @@ -17,18 +17,48 @@ function ResultPage() {

가장 많이 적혀진 태그

- - - + + +
-

가장 많이 적혀진 태그

+

내가 받은 태그 목록

-
1등
-
2등
-
3등
+ + +
diff --git a/src/components/common/ResultCard/index.module.scss b/src/components/common/ResultCard/index.module.scss index 9e1705d..ddac455 100644 --- a/src/components/common/ResultCard/index.module.scss +++ b/src/components/common/ResultCard/index.module.scss @@ -7,14 +7,21 @@ border-radius: 4px; gap: 18px; width: 100%; - padding: 12px 12px 36px 12px; + padding: 12px; position: relative; + &.open { + padding: 12px 12px 36px 12px; + } + .cardTitleWrapper { display: flex; flex-direction: column; gap: 12px; - border-bottom: 1px dashed color("grey/08"); + + &.open { + border-bottom: 1px dashed color("grey/08"); + } .titleDescription { display: flex; @@ -34,6 +41,14 @@ padding: 0px; border: none; background-color: transparent; + + .arrowIcon { + transform: rotate(0); + + &.open { + transform: rotate(180deg); + } + } } } diff --git a/src/components/common/ResultCard/index.tsx b/src/components/common/ResultCard/index.tsx index cf0889d..80b6764 100644 --- a/src/components/common/ResultCard/index.tsx +++ b/src/components/common/ResultCard/index.tsx @@ -1,3 +1,7 @@ +'use client'; + +import { checkEmpty, checkNumber } from '@nf-team/core'; +import { useBoolean } from '@nf-team/react'; import clsx from 'clsx'; import fonts from '@/app/fonts'; @@ -7,33 +11,45 @@ import { ColorType } from '@/lib/types/color'; import styles from './index.module.scss'; type Props = { - color: ColorType; + color?: ColorType; + grade?: number; + voteCount: number; + title: string; + voters: string[]; }; -function ResultCard({ color }: Props) { +function ResultCard({ + color, grade, voteCount, title, voters, +}: Props) { + const [isOpen, , , toggleOpen] = useBoolean(false); + return ( -
-
-
-
-
1등
+
+
+ {grade && ( +
+
+
{`${checkNumber(grade)}등`}
+
+
+
{`${checkNumber(voteCount)}명 적음`}
-
-
51명 적음
-
+ )}
-
안녕하세요안녕하세요안녕하세요
-
-
-
태그 적은 사람
-
- 사승민, 안정균, 한채영,어쩌고,저쩌고,어쩌고저쩌고,블라블라, + {isOpen && ( +
+
태그 적은 사람
+
+ {checkEmpty(voters).join(', ')} +
-
+ )}
); }