From 504088e30a2e319f9602d4d8e4c4d74f8b3fd2b3 Mon Sep 17 00:00:00 2001 From: kyuhho Date: Tue, 9 Jul 2024 16:47:33 +0900 Subject: [PATCH 01/24] feat: add clarity tag --- public/index.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/public/index.html b/public/index.html index 6582a0d7..3b706977 100644 --- a/public/index.html +++ b/public/index.html @@ -1,6 +1,22 @@ + + + Date: Tue, 9 Jul 2024 17:41:14 +0900 Subject: [PATCH 02/24] feat: init card component (#339) --- src/components/Common/CounselorCard.tsx | 171 ++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 src/components/Common/CounselorCard.tsx diff --git a/src/components/Common/CounselorCard.tsx b/src/components/Common/CounselorCard.tsx new file mode 100644 index 00000000..d886653e --- /dev/null +++ b/src/components/Common/CounselorCard.tsx @@ -0,0 +1,171 @@ +import styled from 'styled-components'; +import { Green, Grey1, Grey2, Grey3, Grey6, White } from 'styles/color'; +import { Body1, Body3, Caption2 } from 'styles/font'; +import { Characters } from 'utils/Characters'; +import { CartegoryState, ConsultTimes } from 'utils/type'; +import { Flex } from './Flex'; +import { ReactComponent as HeartIcon } from 'assets/icons/icon-heart2.svg'; +import { Space } from './Space'; +import { TagA2Cartegory } from './TagA2Cartegory'; +import { Button } from './Button'; +import { useNavigate } from 'react-router-dom'; + +import { ReactComponent as NoneBookMark } from 'assets/icons/icon-save1.svg'; +import { ReactComponent as BookMark } from 'assets/icons/icon-save2.svg'; +import { useState } from 'react'; + +// +// +// + +interface CounselorCardProps { + counselorId: number; + tagList: CartegoryState[]; + consultTimes: ConsultTimes; + introduction: string; + nickname: string; + level: number; + isWishList: boolean; + rating: number; + totalReview: number; + consultType: string[]; + letterPrice: number; + chattingPrice: number; + consultStyle: number | undefined; + totalConsult: number; +} + +// +// +// + +const CounselorCard = ({ + counselorId, + tagList, + consultTimes, + introduction, + nickname, + level, + isWishList, + rating, + totalReview, + consultType, + letterPrice, + chattingPrice, + consultStyle, + totalConsult, +}: CounselorCardProps) => { + const navigate = useNavigate(); + + const [isSaved, setIsSaved] = useState(isWishList); + + // + // + // + + return ( + + + {introduction} + + + + + + + + + + + {nickname} + {'LV. ' + level} + + + 상담 {totalConsult}회 + + 후기 {totalReview}개 + + + + {rating} + + + + + + {tagList.map((value: any) => { + return ( + + ); + })} + + + + {isSaved ? ( + + ) : ( + + )} +