From db84f5d0408e18afc6ffeacb1b9a35f816c277e0 Mon Sep 17 00:00:00 2001 From: kyuhho Date: Sun, 16 Jun 2024 20:52:19 +0900 Subject: [PATCH 01/19] chore: fix layout break (#304) --- src/App.Layout.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.Layout.tsx b/src/App.Layout.tsx index f4876c94..f7e7dc04 100644 --- a/src/App.Layout.tsx +++ b/src/App.Layout.tsx @@ -118,11 +118,12 @@ const AppLayout = ({ children }: AppLayoutProps) => { onClick={() => { navigate('/service'); }} + style={{ cursor: 'pointer' }} /> -
{children}
+
{children}
From e92913994c709fb8fe672a9c919dc2b82d6b8a0e Mon Sep 17 00:00:00 2001 From: inyoung Date: Mon, 17 Jun 2024 15:29:02 +0900 Subject: [PATCH 02/19] =?UTF-8?q?Feat:=20=EB=93=A4=EC=A4=80=EB=A7=88=20?= =?UTF-8?q?=EC=B9=B4=EB=93=9C=20navigation=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EA=B5=AC=ED=98=84=20#307?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Buyer/BuyerHome/HomeConsultInReady.tsx | 41 ++++++++++++++----- src/components/Common/Header.tsx | 6 +++ src/pages/Buyer/BuyerHome.tsx | 3 ++ 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx b/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx index 6df89ad2..892e499a 100644 --- a/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx +++ b/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import { Subtitle } from 'styles/font'; +import { Caption2, Subtitle } from 'styles/font'; import { ReactComponent as More } from 'assets/icons/icon-more.svg'; import { ReadyConsultCard } from '../Common/ReadyConsultCard'; @@ -7,9 +7,17 @@ import { useNavigate } from 'react-router-dom'; import { SearchResultData } from 'utils/type'; import { consultStyleToCharNum } from 'utils/convertStringToCharNum'; import { AppendCategoryType } from 'utils/AppendCategoryType'; +import { Green, Grey2 } from 'styles/color'; +import { Space } from 'components/Common/Space'; +/// +/// +/// interface HomeConsultInReadyProps { searchData: SearchResultData[]; } +/// +/// +/// export const HomeConsultInReady = ({ searchData }: HomeConsultInReadyProps) => { const navigate = useNavigate(); @@ -22,9 +30,16 @@ export const HomeConsultInReady = ({ searchData }: HomeConsultInReadyProps) => { }} > - 들을 준비가 된 마인더들 +
+ 들을 준비가 된 마인더들 + +
+ + + 현재 시간 20시 기준, 실시간 상담을 + 신청할 수 있어요 +
- {searchData.map((value, index) => { if (index <= 2) { @@ -54,7 +69,7 @@ export const HomeConsultInReady = ({ searchData }: HomeConsultInReadyProps) => { ); }; -const Wrapper = styled.div` +const Wrapper = styled.section` display: flex; flex-direction: column; align-items: center; @@ -62,7 +77,6 @@ const Wrapper = styled.div` margin-bottom: 3.5rem; .nav-consult { width: 100%; - height: 4.4rem; display: flex; box-sizing: border-box; align-items: center; @@ -73,9 +87,16 @@ const Wrapper = styled.div` } `; const NavConsult = styled.div` - display: flex; - align-items: center; - gap: 0.8rem; - margin: 0px auto 0px 0px; + width: 100%; + span#current-time { + color: ${Green}; + } + .row1 { + display: flex; + width: 100%; + align-items: center; + } +`; +const MoreIcon = styled(More)` + margin-left: auto; `; -const MoreIcon = styled(More)``; diff --git a/src/components/Common/Header.tsx b/src/components/Common/Header.tsx index fc513db9..d555a86f 100644 --- a/src/components/Common/Header.tsx +++ b/src/components/Common/Header.tsx @@ -4,10 +4,16 @@ import { ReactComponent as LogoSeller } from 'assets/icons/logo-seller.svg'; import { ReactComponent as LogoText } from 'assets/icons/logo-text.svg'; import { ReactComponent as Search } from 'assets/icons/search.svg'; import { useNavigate } from 'react-router-dom'; +// +// +// interface HeaderProps { isBuyer: boolean; onClick?: React.MouseEventHandler; } +// +// +// export const Header = ({ isBuyer, onClick }: HeaderProps) => { const navigate = useNavigate(); diff --git a/src/pages/Buyer/BuyerHome.tsx b/src/pages/Buyer/BuyerHome.tsx index 6152b1a6..ffb90831 100644 --- a/src/pages/Buyer/BuyerHome.tsx +++ b/src/pages/Buyer/BuyerHome.tsx @@ -9,6 +9,9 @@ import HomeAboutFooterSection from 'components/Common/HomeAboutFooterSection'; import { SearchResultData } from 'utils/type'; import { useEffect, useState } from 'react'; import { patchCounselorsAll } from 'api/patch'; +// +// +// export const BuyerHome = () => { const navigate = useNavigate(); const [searchData, setSearchData] = useState([]); From 423f7dd3649439afe2282a9431d9cab798ccdf78 Mon Sep 17 00:00:00 2001 From: inyoung Date: Wed, 19 Jun 2024 16:20:14 +0900 Subject: [PATCH 03/19] Style: RedayConsultCard renewal design reflection #307 --- .../Buyer/BuyerHome/HomeConsultInReady.tsx | 5 +- .../Buyer/Common/ReadyConsultCard.tsx | 200 ++++++------------ src/utils/getCurrentHour.ts | 5 + 3 files changed, 72 insertions(+), 138 deletions(-) create mode 100644 src/utils/getCurrentHour.ts diff --git a/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx b/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx index 892e499a..0a847417 100644 --- a/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx +++ b/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx @@ -9,6 +9,7 @@ import { consultStyleToCharNum } from 'utils/convertStringToCharNum'; import { AppendCategoryType } from 'utils/AppendCategoryType'; import { Green, Grey2 } from 'styles/color'; import { Space } from 'components/Common/Space'; +import { getCurrentHour } from 'utils/getCurrentHour'; /// /// /// @@ -36,8 +37,8 @@ export const HomeConsultInReady = ({ searchData }: HomeConsultInReadyProps) => { - 현재 시간 20시 기준, 실시간 상담을 - 신청할 수 있어요 + 현재 시간 {getCurrentHour()}시 기준, + 실시간 상담을 신청할 수 있어요 diff --git a/src/components/Buyer/Common/ReadyConsultCard.tsx b/src/components/Buyer/Common/ReadyConsultCard.tsx index 18e048ed..7195a56b 100644 --- a/src/components/Buyer/Common/ReadyConsultCard.tsx +++ b/src/components/Buyer/Common/ReadyConsultCard.tsx @@ -1,19 +1,21 @@ import styled from 'styled-components'; -import { Grey1, Grey2, Grey3, Grey5, Grey6, White } from 'styles/color'; +import { Green, Grey2, Grey3, Grey6, White } from 'styles/color'; import { TagA2Cartegory } from '../../Common/TagA2Cartegory'; import { Body1, Body3, Caption2 } from 'styles/font'; import { Characters } from 'utils/Characters'; import { ReactComponent as HeartIcon } from 'assets/icons/icon-heart2.svg'; import { ReactComponent as NoneBookMark } from 'assets/icons/icon-save1.svg'; import { ReactComponent as BookMark } from 'assets/icons/icon-save2.svg'; -import { ReactComponent as DownIcon } from 'assets/icons/icon-down-toggle.svg'; -import { ReactComponent as UpIcon } from 'assets/icons/icon-up-toggle.svg'; import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { CartegoryState, ConsultTimes } from 'utils/type'; -import { convertTimeToString } from 'utils/convertTimeToString'; import { deleteWishLists } from 'api/delete'; import { patchWishLists } from 'api/patch'; +import { Space } from 'components/Common/Space'; +import { Button } from 'components/Common/Button'; +// +// +// interface ReadyConsultCardProps { counselorId: number; tagList: CartegoryState[]; @@ -29,7 +31,9 @@ interface ReadyConsultCardProps { chattingPrice: number; consultStyle: number; } -//일단 toggle파트 제외하고 클릭 시 상담프로필로 navigate하게 구현 +// +// +// export const ReadyConsultCard = ({ counselorId, tagList, @@ -46,8 +50,6 @@ export const ReadyConsultCard = ({ consultStyle, }: ReadyConsultCardProps) => { const navigate = useNavigate(); - //toggle - const [toggle, setToggle] = useState(false); //찜하기 여부 const [isSaved, setIsSaved] = useState(isWishList); //보내는 동안 중복 클릭 방지 @@ -98,10 +100,11 @@ export const ReadyConsultCard = ({ { - //마인더 프로필 개발되면 수정 navigate(`/profile/${counselorId}`); }} > + {introduction} + {tagList.map((value: any, index) => { return ( @@ -109,112 +112,48 @@ export const ReadyConsultCard = ({ ); })} - {introduction} { navigate(`/profile/${counselorId}`); }} > - -
-
- {nickname} - {'Lv. ' + level} +
+
+
-
- - {rating + ' (' + totalReview + ')'} +
+
+ {nickname} + {'LV. ' + level} +
+
+ 상담 17회 + + 후기 132회 + +
+ + 4.3 +
+
+ +
+ ) : // 상담카드 부분 + openConsultList.length !== 0 ? ( + + + 아직 진행한 상담이 없어요 + + 상담은 공개상담 탭에서 신청할 수 있어요. + ) : ( - {/* 상담카드 부분 */} - {openConsultList.length === 0 ? ( - - - 아직 진행한 상담이 없어요 - - ) : ( - openConsultList?.map((item) => { - if (item.title === null) { - return ( - - - {item.isCompleted === null - ? '상담 글을 작성해주세요!' - : '임시저장된 글입니다.'} - - - {item.isCompleted === null - ? '결제 후 작성전' - : '이어서 작성하기'} - - - - ); - } else { - return ( - { + if (item.title === null) { + return ( + + + {item.isCompleted === null + ? '상담 글을 작성해주세요!' + : '임시저장된 글입니다.'} + + + {item.isCompleted === null + ? '결제 후 작성전' + : '이어서 작성하기'} + + + + ); + } else { + return ( + { + navigate(`/open-consult/${item.postId}?isMine=true`); + }} + > +
+ {item?.title} + {!item?.isPublic && ( + + + 비공개 + + )} +
+ +
{item?.content}
+
+ + {item?.isLiked ? : } + {item?.totalLike} + + + {item?.isScrapped ? : } + {item?.totalScrap} + + + + {item?.totalComment} + +
+ {item?.updatedAt} +
+ ); + } + })}
- )} + ) + // 상담카드 부분 끝 + } + {/* 마지막 요소가 가려지지 않도록 마진 영역을 추가 */} +
@@ -331,7 +326,7 @@ const EmptyIcon = styled(Empty)` padding: 4.7rem 4.41rem 4.603rem 4.5rem; `; const EmptyWrapper = styled.div` - margin: 10vh auto 0px; + margin: calc(10vh - 1px) auto 0px; display: flex; flex-direction: column; align-items: center; From 39277f4caf8177c7e9487772669430af5c600701 Mon Sep 17 00:00:00 2001 From: inyoung Date: Wed, 19 Jun 2024 17:46:53 +0900 Subject: [PATCH 08/19] =?UTF-8?q?Chore:=20=EC=85=B0=EC=96=B4=20=EC=83=81?= =?UTF-8?q?=EB=8B=B4=20=ED=83=AD=EC=97=90=EC=84=9C=20=EA=B3=B5=EA=B0=9C?= =?UTF-8?q?=EC=83=81=EB=8B=B4=20=EC=8B=A0=EC=B2=AD=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20#307?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BuyerConsult/BuyerOpenConsultSection.tsx | 189 +++++++++--------- 1 file changed, 92 insertions(+), 97 deletions(-) diff --git a/src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx b/src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx index e4c3b184..a8e3a1f7 100644 --- a/src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx +++ b/src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx @@ -105,95 +105,100 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) { return ( <> - {isLoading ? ( -
- -
- ) : // 상담카드 부분 - openConsultList.length !== 0 ? ( - - - 아직 진행한 상담이 없어요 - - 상담은 공개상담 탭에서 신청할 수 있어요. - - ) : ( - - {openConsultList?.map((item) => { - if (item.title === null) { - return ( - - - {item.isCompleted === null - ? '상담 글을 작성해주세요!' - : '임시저장된 글입니다.'} - - - {item.isCompleted === null - ? '결제 후 작성전' - : '이어서 작성하기'} - -
+ ) : // 상담카드 부분 + openConsultList.length !== 0 ? ( + + + 아직 진행한 상담이 없어요 + + 상담은 공개상담 탭에서 신청할 수 있어요. + + ) : ( + + {openConsultList?.map((item) => { + if (item.title === null) { + return ( + + + {item.isCompleted === null + ? '상담 글을 작성해주세요!' + : '임시저장된 글입니다.'} + + + {item.isCompleted === null + ? '결제 후 작성전' + : '이어서 작성하기'} + + + + ); + } else { + return ( + { - navigate(`/writeOpenConsult/${item.postId}`); + navigate(`/open-consult/${item.postId}?isMine=true`); }} - > - - ); - } else { - return ( - { - navigate(`/open-consult/${item.postId}?isMine=true`); - }} - > -
- {item?.title} - {!item?.isPublic && ( - - - 비공개 - - )} -
- -
{item?.content}
-
- - {item?.isLiked ? : } - {item?.totalLike} - - - {item?.isScrapped ? : } - {item?.totalScrap} - - - - {item?.totalComment} - -
- {item?.updatedAt} -
- ); - } - })} -
- ) - // 상담카드 부분 끝 + > +
+ {item?.title} + {!item?.isPublic && ( + + + 비공개 + + )} +
+ +
{item?.content}
+
+ + {item?.isLiked ? ( + + ) : ( + + )} + {item?.totalLike} + + + {item?.isScrapped ? : } + {item?.totalScrap} + + + + {item?.totalComment} + +
+ {item?.updatedAt} + + ); + } + })} + + ) + // 상담카드 부분 끝 } {/* 마지막 요소가 가려지지 않도록 마진 영역을 추가 */} @@ -206,16 +211,6 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) { )} - -
) : // 상담카드 부분 - openConsultList.length !== 0 ? ( + openConsultList.length === 0 ? ( 아직 진행한 상담이 없어요 @@ -130,24 +131,29 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) { if (item.title === null) { return ( - - {item.isCompleted === null - ? '상담 글을 작성해주세요!' - : '임시저장된 글입니다.'} - + + + {item.isCompleted === null + ? '상담 글을 작성해주세요!' + : '임시저장된 글입니다.'} + + {item.updatedAt} + + {item.isCompleted === null - ? '결제 후 작성전' + ? '공개상담을 결제한 후 아직 글을 작성하지 않으셨어요. 구매 후 24시간이 지나면 자동으로 환불이 진행됩니다.' : '이어서 작성하기'}
diff --git a/src/utils/type.ts b/src/utils/type.ts index 81f4e5d4..a59b0694 100644 --- a/src/utils/type.ts +++ b/src/utils/type.ts @@ -85,6 +85,7 @@ export type SearchResultData = { nickname: string; ratingAverage: number; totalReview: number; + totalConsult: number; }; export interface BuyerReview { From bec3eae81fa9b609838664dff5fd83c9355c4079 Mon Sep 17 00:00:00 2001 From: inyoung Date: Thu, 20 Jun 2024 21:28:50 +0900 Subject: [PATCH 17/19] =?UTF-8?q?Chore:=20=EC=B0=9C=ED=95=98=EA=B8=B0=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98=20=ED=81=AC=EA=B8=B0=20=EC=A1=B0?= =?UTF-8?q?=EC=A0=95,=20=EB=A7=88=EC=9D=B8=EB=8D=94=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20Footer=EC=97=90=20=EA=B7=B8=EB=A6=BC=EC=9E=90=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20#307?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/icon-save1.svg | 4 ++-- src/assets/icons/icon-save2.svg | 2 +- .../Buyer/BuyerCounselorProfile/CounselorFooter.tsx | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/assets/icons/icon-save1.svg b/src/assets/icons/icon-save1.svg index d0e18d03..675c15bc 100644 --- a/src/assets/icons/icon-save1.svg +++ b/src/assets/icons/icon-save1.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/src/assets/icons/icon-save2.svg b/src/assets/icons/icon-save2.svg index 9849f5fa..19cd11c0 100644 --- a/src/assets/icons/icon-save2.svg +++ b/src/assets/icons/icon-save2.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/Buyer/BuyerCounselorProfile/CounselorFooter.tsx b/src/components/Buyer/BuyerCounselorProfile/CounselorFooter.tsx index 28e26481..7fb4a7c0 100644 --- a/src/components/Buyer/BuyerCounselorProfile/CounselorFooter.tsx +++ b/src/components/Buyer/BuyerCounselorProfile/CounselorFooter.tsx @@ -102,22 +102,22 @@ const Wrapper = styled.div` } display: flex; justify-content: center; + align-items: center; gap: 2rem; background-color: ${White}; padding: 0.8rem 2rem 1.2rem 2rem; position: fixed; bottom: 0; z-index: 999; + box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.1); `; const NoneBookMarkIcon = styled(NoneBookMark)` - width: 4.2rem; - height: 3.9rem; + width: 2.8rem; + height: 2.8rem; cursor: pointer; - margin-top: 0.5rem; `; const BookMarkIcon = styled(BookMark)` - width: 4.2rem; - height: 3.9rem; + width: 2.8rem; + height: 2.8rem; cursor: pointer; - margin-top: 0.5rem; `; From 6d7c558066dbd2e1b0649740ba6bf861388543fd Mon Sep 17 00:00:00 2001 From: inyoung Date: Mon, 24 Jun 2024 18:34:40 +0900 Subject: [PATCH 18/19] =?UTF-8?q?Refactor:=20isActiveFinishButton=20?= =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=20=ED=95=98=EC=A7=80=20=EC=95=8A=EA=B8=B0=20?= =?UTF-8?q?#307?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Seller/SellerProfitBankAccount.tsx | 52 +++++++++++--------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/src/pages/Seller/SellerProfitBankAccount.tsx b/src/pages/Seller/SellerProfitBankAccount.tsx index 22bf6b8a..98ac0393 100644 --- a/src/pages/Seller/SellerProfitBankAccount.tsx +++ b/src/pages/Seller/SellerProfitBankAccount.tsx @@ -7,7 +7,7 @@ import Input from 'components/Common/Input'; import { Space } from 'components/Common/Space'; import BankSelectModal from 'components/Seller/Common/BankSelectModal'; import { BottomButtonWrapper } from 'components/Seller/Common/BottomButton'; -import React, { useEffect, useState } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useRecoilState } from 'recoil'; import styled from 'styled-components'; @@ -15,18 +15,23 @@ import { Grey1, Grey6 } from 'styles/color'; import { Body1, Heading } from 'styles/font'; import { BankIcon } from 'utils/BankIcon'; import { isBankModalOpenState } from 'utils/atom'; - +// +// +// function SellerProfitBankAccount() { const navigate = useNavigate(); const [accountNum, setAccountNum] = useState(''); const [bankType, setBankType] = useState(''); const [owner, setOwner] = useState(''); - + + // 완료버튼 활성화 여부 + const isActiveFinishButton = + accountNum?.length > 0 && bankType?.length > 0 && owner?.length > 0; + // 은행 모달 const [isBankModalOpen, setIsBankModalOpen] = useRecoilState(isBankModalOpenState); - const [isActiveFisnishButton, setIsActiveFinishButton] = useState(false); useEffect(() => { const fetchAccountData = async () => { try { @@ -42,32 +47,35 @@ function SellerProfitBankAccount() { }; fetchAccountData(); }, []); - useEffect(() => { - if (accountNum?.length > 0 && bankType?.length > 0 && owner?.length > 0) { - setIsActiveFinishButton(true); - } else { - setIsActiveFinishButton(false); - } - }, [accountNum, bankType, owner]); - const handleAccountNumChange = (e: React.ChangeEvent) => { - const value = e.target.value; - const sanitizedValue = value.replace(/[^0-9]/g, ''); - setAccountNum(sanitizedValue); - }; + const handleAccountNumChange = useCallback( + (e: React.ChangeEvent) => { + const value = e.target.value; + const sanitizedValue = value.replace(/[^0-9]/g, ''); + setAccountNum(sanitizedValue); + }, + [], + ); - const handlePostAccountInfo = async () => { - // 임시조건 + const handlePostAccountInfo = useCallback(async () => { if (accountNum !== '' && bankType !== '' && owner !== '') { const body = { account: accountNum, bank: bankType, accountHolder: owner, }; - await patchCounselorsAccount(body); - navigate('/minder/mypage'); + try { + const res: any = await patchCounselorsAccount(body); + if (res.status === 200) { + navigate('/minder/mypage'); + } else { + alert('수익계좌 업데이트 중 오류가 발생했습니다.'); + } + } catch (err) { + alert(err); + } } - }; + }, [accountNum, bankType, owner, navigate]); return ( @@ -125,7 +133,7 @@ function SellerProfitBankAccount() { text="완료" width="calc(100% - 4rem)" height="5.2rem" - isActive={isActiveFisnishButton ? true : false} + isActive={isActiveFinishButton ? true : false} onClick={() => { handlePostAccountInfo(); }} From 4508d377ed50912dd1331658c30961aa5d4273fd Mon Sep 17 00:00:00 2001 From: inyoung Date: Mon, 24 Jun 2024 19:02:04 +0900 Subject: [PATCH 19/19] =?UTF-8?q?Chore:=20=EC=95=9E=EC=97=90=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=203=EA=B0=9C=EB=A7=8C=20=EB=A6=AC=ED=84=B4=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=A1=9C=EC=A7=81=EC=9D=84=20slice=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EC=9D=B4=EC=9A=A9=ED=95=98=EB=8A=94=20=EA=B1=B8?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20#307?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Buyer/BuyerHome/HomeConsultInReady.tsx | 48 +++++++++---------- .../Buyer/Common/ReadyConsultCard.tsx | 2 +- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx b/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx index c6f77028..6abc69ed 100644 --- a/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx +++ b/src/components/Buyer/BuyerHome/HomeConsultInReady.tsx @@ -42,31 +42,29 @@ export const HomeConsultInReady = ({ searchData }: HomeConsultInReadyProps) => { - {searchData.map((value, index) => { - if (index <= 2) { - return ( - - ); - } + {searchData.slice(0, 3).map((value) => { + return ( + + ); })} ); diff --git a/src/components/Buyer/Common/ReadyConsultCard.tsx b/src/components/Buyer/Common/ReadyConsultCard.tsx index 698130f3..497f32c8 100644 --- a/src/components/Buyer/Common/ReadyConsultCard.tsx +++ b/src/components/Buyer/Common/ReadyConsultCard.tsx @@ -29,7 +29,7 @@ interface ReadyConsultCardProps { consultType: string[]; letterPrice: number; chattingPrice: number; - consultStyle: number; + consultStyle: number | undefined; totalConsult: number; } //