From 0a873cd3bf94955a722b6ebbcbe24e3247b13305 Mon Sep 17 00:00:00 2001 From: Lee Kyuho <64120854+leekyuho114@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:57:03 +0900 Subject: [PATCH 01/19] Update bug.md --- .github/ISSUE_TEMPLATE/bug.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index cc0dc4bb..87b03125 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -6,14 +6,36 @@ labels: 'Bug' assignees: '' --- -## Describtion +## 문제 상황 (AS-IS)
-Bug 내용을 작성해주세요. +(현재 어떤 문제나 어려움이 발생 했는지 설명합니다.)
-## Etc +## 기대상황 (TO-BE)
-추가적인 사항을 작성해주세요.(선택) +(기대하는/정상적인 상황에서는 어떻게 동작해야되는지 설명합니다.) +
+ +## 재현 방법 + +
+(해당 문제를 재현할 수 있는 방법을 시나리오 기반으로 작성합니다.) +
+ +## 스크린샷 + +
+(문제상황을 빠르게 이해할 수 있도록 참고할 수 있는 UI 스크린샷을 첨부합니다.) +
+ +## 환경 + +
+(어떠한 환경에서 문제가 발생했는지 정보를 입력합니다.) + +- **URL(*필수)**: (예시화면 링크) +- Email(계정정보): +- 브라우저:
From eabf36e2d1c4979481328d39a76617809915e248 Mon Sep 17 00:00:00 2001 From: Lee Kyuho <64120854+leekyuho114@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:59:09 +0900 Subject: [PATCH 02/19] Update pull_request_Template.md --- .github/pull_request_Template.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_Template.md b/.github/pull_request_Template.md index e4e2c94a..ab623fed 100644 --- a/.github/pull_request_Template.md +++ b/.github/pull_request_Template.md @@ -7,12 +7,18 @@
-## Describtion +## Description
PR 내용을 작성해주세요.
+## Related Issues + +
+관련된 이슈 number를 작성해주세요. +
+ ## To Reveiwer
From 8aaaf0e44645bc49cb9e374e56659b0cd4e2b6f6 Mon Sep 17 00:00:00 2001 From: Inyoung Chung <87219998+rmdnps10@users.noreply.github.com> Date: Sat, 27 Apr 2024 04:14:50 +0900 Subject: [PATCH 03/19] =?UTF-8?q?Revert=20"[Hotfix]=20=EC=8B=9C=EA=B0=84?= =?UTF-8?q?=20=EC=84=A0=ED=83=9D=20=EB=AA=A8=EB=8B=AC=20=EB=94=94=EB=B0=94?= =?UTF-8?q?=EC=9D=B4=EC=8A=A4=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=20=EA=B9=A8=EC=A7=90=20=EC=98=A4=EB=A5=98"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Buyer/BuyerHome/HomeConsultInProgress.tsx | 2 +- .../BuyerOpenConsult/HotOpenConsultList.tsx | 6 +-- .../BuyerOpenConsultDetail/CommentCard.tsx | 8 ++-- src/components/Common/TabB2.tsx | 2 +- .../ModifyProfileMainSection.tsx | 38 ++++++++++++++++++- .../SetChatTimeSection.tsx | 8 +--- .../TimeSelectModal.tsx | 17 ++++----- .../SellerOpenConsult/CommentListSection.tsx | 3 +- src/pages/Seller/SellerOpenConsult.tsx | 15 ++------ 9 files changed, 58 insertions(+), 41 deletions(-) diff --git a/src/components/Buyer/BuyerHome/HomeConsultInProgress.tsx b/src/components/Buyer/BuyerHome/HomeConsultInProgress.tsx index 9e5a30a9..a1ed613f 100644 --- a/src/components/Buyer/BuyerHome/HomeConsultInProgress.tsx +++ b/src/components/Buyer/BuyerHome/HomeConsultInProgress.tsx @@ -74,7 +74,7 @@ export const HomeConsultInProgress = () => { currentChatIdRef.current = res.data.responses[0].id; connectConsultInProgress(res.data.responses[0].id); } - } else if (res?.response?.status === 401) { + } else if (res.response.status === 401) { setIsLogined(false); } } catch (e) { diff --git a/src/components/Buyer/BuyerOpenConsult/HotOpenConsultList.tsx b/src/components/Buyer/BuyerOpenConsult/HotOpenConsultList.tsx index 48f60029..4be1b6ad 100644 --- a/src/components/Buyer/BuyerOpenConsult/HotOpenConsultList.tsx +++ b/src/components/Buyer/BuyerOpenConsult/HotOpenConsultList.tsx @@ -15,9 +15,7 @@ function HotOpenConsultList() { useEffect(() => { const fetchHotConsultList = async () => { const res: any = await getCustomerPopularConsultList(); - if (res.status === 200) { - setHotConsultList(res.data); - } + setHotConsultList(res.data); }; fetchHotConsultList(); }, []); @@ -26,7 +24,7 @@ function HotOpenConsultList() { - {hotConsultList?.map((item) => ( + {hotConsultList.map((item) => ( { diff --git a/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx b/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx index 47ff7eae..66815b62 100644 --- a/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx +++ b/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx @@ -1,5 +1,8 @@ import { commentApiObject } from 'components/Seller/SellerOpenConsult/CommentListSection'; -import React, { useCallback, useState } from 'react'; +import React, { + useCallback, + useState, +} from 'react'; import styled from 'styled-components'; import { Grey1, Grey2, Grey3, Grey6, Red, White } from 'styles/color'; import { Body1, Body3, Caption1, Caption2 } from 'styles/font'; @@ -12,7 +15,6 @@ import { ReactComponent as CheckIcon } from 'assets/icons/icon-check2.svg'; import { deleteCommentLikes } from 'api/delete'; import { postLikeComment } from 'api/post'; import { consultStyleToCharNum } from 'utils/convertStringToCharNum'; -import { formattedMessage } from 'utils/formattedMessage'; interface CommentCardProps { item: commentApiObject; isMyPost: boolean; @@ -74,7 +76,7 @@ function CommentCard({ {item.updatedAt} - {formattedMessage(item.content)} + {item.content} {isLike ? ( diff --git a/src/components/Common/TabB2.tsx b/src/components/Common/TabB2.tsx index 16f8f51e..d3923329 100644 --- a/src/components/Common/TabB2.tsx +++ b/src/components/Common/TabB2.tsx @@ -4,7 +4,7 @@ import styled from 'styled-components'; // 왼쪽 아이콘 Import 후
<아이콘/>
// 오른쪾 아이코 Import 후
<아이콘/>
-export const TabB2 = styled.header` +export const TabB2 = styled.div` display: flex; align-items: center; background-color: ${White}; diff --git a/src/components/Seller/SellerMyPageModifyProfile/ModifyProfileMainSection.tsx b/src/components/Seller/SellerMyPageModifyProfile/ModifyProfileMainSection.tsx index 8b8be4c1..2b2d711e 100644 --- a/src/components/Seller/SellerMyPageModifyProfile/ModifyProfileMainSection.tsx +++ b/src/components/Seller/SellerMyPageModifyProfile/ModifyProfileMainSection.tsx @@ -22,12 +22,14 @@ import { isCategoryModalOpenState, isStyleModalOpenState, isTypeOpenModalState, + isBankModalOpenState, } from 'utils/atom'; import { categoryInputMaker } from 'utils/categoryInputmaker'; import { BottomButton } from '../Common/BottomButton'; import { Space } from 'components/Common/Space'; import { UpdatePopup } from './UpdatePopup'; import { SelectedTimeList } from './SetChatTimeSection'; +import { convertTimeRange } from 'utils/convertTimeToString'; interface ModifyProfileMainSectionProps { selectCategory: number[]; @@ -55,6 +57,7 @@ const dayEngtoKor: Record = { SAT: '토', SUN: '일', }; +const daysOfWeek = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']; function convertObjectToString(schedule: any) { const daysOfWeek = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']; @@ -116,6 +119,7 @@ function ModifyProfileMainSection({ ); const [isTypeModalOpen, setIsTypeModalOpen] = useRecoilState(isTypeOpenModalState); + const setIsBankModalOpen = useSetRecoilState(isBankModalOpenState); const [isUpdateModalOpen, setIsUpdateModalOpen] = useRecoilState( isUpdateModalOpenState, ); @@ -484,8 +488,6 @@ const ModifyProfileMainSectionWrapper = styled.section` margin-top: 0.2rem; flex-direction: column; gap: 1.1rem; - height: calc(100vh - 5.3rem); - overflow:scroll; `; const ModifyProfileBox = styled.div` @@ -583,4 +585,36 @@ const ExperienceTextArea = styled.textarea` } `; +const AccountTag = styled.div` + width: 8rem; + margin-right: 1.7rem; + font-family: Pretendard; + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 150%; /* 2.4rem */ +`; + +const BankTypeSelect = styled.div` + border-radius: 1.2rem; + background: ${Grey6}; + height: 4.8rem; + padding: 1.2rem 1.6rem; + display: flex; + gap: 0.8rem; + cursor: pointer; + box-sizing: border-box; + width: 100%; +`; + +const OneLinerInput = styled.div` + width: 100%; + height; 4.8rem; + background-color: ${Grey6}; + padding: 1.2rem 1.6rem; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + `; + export default React.memo(ModifyProfileMainSection); diff --git a/src/components/Seller/SellerMyPageModifyProfile/SetChatTimeSection.tsx b/src/components/Seller/SellerMyPageModifyProfile/SetChatTimeSection.tsx index 1e561610..c985f036 100644 --- a/src/components/Seller/SellerMyPageModifyProfile/SetChatTimeSection.tsx +++ b/src/components/Seller/SellerMyPageModifyProfile/SetChatTimeSection.tsx @@ -110,13 +110,7 @@ function SetChatTimeSection({ setIsActive={setIsActive} /> )} - {(isOutPopupOpen || isTimeModalOpen) && ( - { - setIsTimeModalOpen(false); - }} - /> - )} + {(isOutPopupOpen || isTimeModalOpen) && } 상담 활동이 가능한 시간대를 설정해주세요.
diff --git a/src/components/Seller/SellerMyPageModifyProfile/TimeSelectModal.tsx b/src/components/Seller/SellerMyPageModifyProfile/TimeSelectModal.tsx index 28854dbd..a0120209 100644 --- a/src/components/Seller/SellerMyPageModifyProfile/TimeSelectModal.tsx +++ b/src/components/Seller/SellerMyPageModifyProfile/TimeSelectModal.tsx @@ -189,6 +189,7 @@ function TimeSelectModal({ 시작시간과 종료시간을 1시간 이상 간격으로 설정해주세요 + {hourList.map((hour) => ( ))} -
- - 24시 이후에 종료하고 싶은 경우, 다음 요일의
- 항목에서 시작과 종료를 별도로 설정해주세요 -
-
+ + 24시 이후에 종료하고 싶은 경우, 다음 요일의
+ 항목에서 시작과 종료를 별도로 설정해주세요 +
); } const HourButtonList = styled.div` display: flex; - margin: 0 2rem; + gap: 2.4rem; + margin: 0 3.15rem; flex-wrap: wrap; `; @@ -247,8 +247,7 @@ const HourButton = styled.div<{ isActive ? Green : isBetween ? LightGreen : isBlock ? Grey5 : White}; color: ${({ isActive, isBetween, isBlock }) => isActive ? White : isBetween ? Black : isBlock ? White : Black}; - width: 18%; - margin: 3.5%; + width: 6rem; font-size: 1.4rem; height: 3.4rem; justify-content: center; diff --git a/src/components/Seller/SellerOpenConsult/CommentListSection.tsx b/src/components/Seller/SellerOpenConsult/CommentListSection.tsx index 00392e06..01f3a96c 100644 --- a/src/components/Seller/SellerOpenConsult/CommentListSection.tsx +++ b/src/components/Seller/SellerOpenConsult/CommentListSection.tsx @@ -19,7 +19,6 @@ import { useParams } from 'react-router-dom'; import { isSendPopupOpenState } from 'utils/atom'; import { useRecoilValue } from 'recoil'; import { consultStyleToCharNum } from 'utils/convertStringToCharNum'; -import { formattedMessage } from 'utils/formattedMessage'; export interface commentApiObject { commentId: string; @@ -76,7 +75,7 @@ function CommentListSection() { {card.updatedAt} - {formattedMessage(card.content)} + {card.content} {card.totalLike} diff --git a/src/pages/Seller/SellerOpenConsult.tsx b/src/pages/Seller/SellerOpenConsult.tsx index f3a09033..86251f50 100644 --- a/src/pages/Seller/SellerOpenConsult.tsx +++ b/src/pages/Seller/SellerOpenConsult.tsx @@ -21,13 +21,8 @@ function SellerOpenConsult() { }} > -
- - -
+ + {isSendPopupOpen && ( <> - + )} From d391d047d4c13bcaeb8dc92bf445afef79fbbfd0 Mon Sep 17 00:00:00 2001 From: Inyoung Chung <87219998+rmdnps10@users.noreply.github.com> Date: Sat, 27 Apr 2024 04:34:03 +0900 Subject: [PATCH 04/19] =?UTF-8?q?Revert=20"Revert=20"[Hotfix]=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=EC=84=A0=ED=83=9D=20=EB=AA=A8=EB=8B=AC=20=EB=94=94?= =?UTF-8?q?=EB=B0=94=EC=9D=B4=EC=8A=A4=EC=97=90=20=EB=94=B0=EB=9D=BC=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EA=B9=A8=EC=A7=90=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Buyer/BuyerHome/HomeConsultInProgress.tsx | 2 +- .../BuyerOpenConsult/HotOpenConsultList.tsx | 6 ++- .../BuyerOpenConsultDetail/CommentCard.tsx | 8 ++-- src/components/Common/TabB2.tsx | 2 +- .../ModifyProfileMainSection.tsx | 38 +------------------ .../SetChatTimeSection.tsx | 8 +++- .../TimeSelectModal.tsx | 17 +++++---- .../SellerOpenConsult/CommentListSection.tsx | 3 +- src/pages/Seller/SellerOpenConsult.tsx | 15 ++++++-- 9 files changed, 41 insertions(+), 58 deletions(-) diff --git a/src/components/Buyer/BuyerHome/HomeConsultInProgress.tsx b/src/components/Buyer/BuyerHome/HomeConsultInProgress.tsx index a1ed613f..9e5a30a9 100644 --- a/src/components/Buyer/BuyerHome/HomeConsultInProgress.tsx +++ b/src/components/Buyer/BuyerHome/HomeConsultInProgress.tsx @@ -74,7 +74,7 @@ export const HomeConsultInProgress = () => { currentChatIdRef.current = res.data.responses[0].id; connectConsultInProgress(res.data.responses[0].id); } - } else if (res.response.status === 401) { + } else if (res?.response?.status === 401) { setIsLogined(false); } } catch (e) { diff --git a/src/components/Buyer/BuyerOpenConsult/HotOpenConsultList.tsx b/src/components/Buyer/BuyerOpenConsult/HotOpenConsultList.tsx index 4be1b6ad..48f60029 100644 --- a/src/components/Buyer/BuyerOpenConsult/HotOpenConsultList.tsx +++ b/src/components/Buyer/BuyerOpenConsult/HotOpenConsultList.tsx @@ -15,7 +15,9 @@ function HotOpenConsultList() { useEffect(() => { const fetchHotConsultList = async () => { const res: any = await getCustomerPopularConsultList(); - setHotConsultList(res.data); + if (res.status === 200) { + setHotConsultList(res.data); + } }; fetchHotConsultList(); }, []); @@ -24,7 +26,7 @@ function HotOpenConsultList() { - {hotConsultList.map((item) => ( + {hotConsultList?.map((item) => ( { diff --git a/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx b/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx index 66815b62..47ff7eae 100644 --- a/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx +++ b/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx @@ -1,8 +1,5 @@ import { commentApiObject } from 'components/Seller/SellerOpenConsult/CommentListSection'; -import React, { - useCallback, - useState, -} from 'react'; +import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; import { Grey1, Grey2, Grey3, Grey6, Red, White } from 'styles/color'; import { Body1, Body3, Caption1, Caption2 } from 'styles/font'; @@ -15,6 +12,7 @@ import { ReactComponent as CheckIcon } from 'assets/icons/icon-check2.svg'; import { deleteCommentLikes } from 'api/delete'; import { postLikeComment } from 'api/post'; import { consultStyleToCharNum } from 'utils/convertStringToCharNum'; +import { formattedMessage } from 'utils/formattedMessage'; interface CommentCardProps { item: commentApiObject; isMyPost: boolean; @@ -76,7 +74,7 @@ function CommentCard({ {item.updatedAt} - {item.content} + {formattedMessage(item.content)} {isLike ? ( diff --git a/src/components/Common/TabB2.tsx b/src/components/Common/TabB2.tsx index d3923329..16f8f51e 100644 --- a/src/components/Common/TabB2.tsx +++ b/src/components/Common/TabB2.tsx @@ -4,7 +4,7 @@ import styled from 'styled-components'; // 왼쪽 아이콘 Import 후
<아이콘/>
// 오른쪾 아이코 Import 후
<아이콘/>
-export const TabB2 = styled.div` +export const TabB2 = styled.header` display: flex; align-items: center; background-color: ${White}; diff --git a/src/components/Seller/SellerMyPageModifyProfile/ModifyProfileMainSection.tsx b/src/components/Seller/SellerMyPageModifyProfile/ModifyProfileMainSection.tsx index 2b2d711e..8b8be4c1 100644 --- a/src/components/Seller/SellerMyPageModifyProfile/ModifyProfileMainSection.tsx +++ b/src/components/Seller/SellerMyPageModifyProfile/ModifyProfileMainSection.tsx @@ -22,14 +22,12 @@ import { isCategoryModalOpenState, isStyleModalOpenState, isTypeOpenModalState, - isBankModalOpenState, } from 'utils/atom'; import { categoryInputMaker } from 'utils/categoryInputmaker'; import { BottomButton } from '../Common/BottomButton'; import { Space } from 'components/Common/Space'; import { UpdatePopup } from './UpdatePopup'; import { SelectedTimeList } from './SetChatTimeSection'; -import { convertTimeRange } from 'utils/convertTimeToString'; interface ModifyProfileMainSectionProps { selectCategory: number[]; @@ -57,7 +55,6 @@ const dayEngtoKor: Record = { SAT: '토', SUN: '일', }; -const daysOfWeek = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']; function convertObjectToString(schedule: any) { const daysOfWeek = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']; @@ -119,7 +116,6 @@ function ModifyProfileMainSection({ ); const [isTypeModalOpen, setIsTypeModalOpen] = useRecoilState(isTypeOpenModalState); - const setIsBankModalOpen = useSetRecoilState(isBankModalOpenState); const [isUpdateModalOpen, setIsUpdateModalOpen] = useRecoilState( isUpdateModalOpenState, ); @@ -488,6 +484,8 @@ const ModifyProfileMainSectionWrapper = styled.section` margin-top: 0.2rem; flex-direction: column; gap: 1.1rem; + height: calc(100vh - 5.3rem); + overflow:scroll; `; const ModifyProfileBox = styled.div` @@ -585,36 +583,4 @@ const ExperienceTextArea = styled.textarea` } `; -const AccountTag = styled.div` - width: 8rem; - margin-right: 1.7rem; - font-family: Pretendard; - font-size: 1.6rem; - font-style: normal; - font-weight: 600; - line-height: 150%; /* 2.4rem */ -`; - -const BankTypeSelect = styled.div` - border-radius: 1.2rem; - background: ${Grey6}; - height: 4.8rem; - padding: 1.2rem 1.6rem; - display: flex; - gap: 0.8rem; - cursor: pointer; - box-sizing: border-box; - width: 100%; -`; - -const OneLinerInput = styled.div` - width: 100%; - height; 4.8rem; - background-color: ${Grey6}; - padding: 1.2rem 1.6rem; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - `; - export default React.memo(ModifyProfileMainSection); diff --git a/src/components/Seller/SellerMyPageModifyProfile/SetChatTimeSection.tsx b/src/components/Seller/SellerMyPageModifyProfile/SetChatTimeSection.tsx index c985f036..1e561610 100644 --- a/src/components/Seller/SellerMyPageModifyProfile/SetChatTimeSection.tsx +++ b/src/components/Seller/SellerMyPageModifyProfile/SetChatTimeSection.tsx @@ -110,7 +110,13 @@ function SetChatTimeSection({ setIsActive={setIsActive} /> )} - {(isOutPopupOpen || isTimeModalOpen) && } + {(isOutPopupOpen || isTimeModalOpen) && ( + { + setIsTimeModalOpen(false); + }} + /> + )} 상담 활동이 가능한 시간대를 설정해주세요.
diff --git a/src/components/Seller/SellerMyPageModifyProfile/TimeSelectModal.tsx b/src/components/Seller/SellerMyPageModifyProfile/TimeSelectModal.tsx index a0120209..28854dbd 100644 --- a/src/components/Seller/SellerMyPageModifyProfile/TimeSelectModal.tsx +++ b/src/components/Seller/SellerMyPageModifyProfile/TimeSelectModal.tsx @@ -189,7 +189,6 @@ function TimeSelectModal({ 시작시간과 종료시간을 1시간 이상 간격으로 설정해주세요 - {hourList.map((hour) => ( ))} - - 24시 이후에 종료하고 싶은 경우, 다음 요일의
- 항목에서 시작과 종료를 별도로 설정해주세요 -
+
+ + 24시 이후에 종료하고 싶은 경우, 다음 요일의
+ 항목에서 시작과 종료를 별도로 설정해주세요 +
+
); } const HourButtonList = styled.div` display: flex; - gap: 2.4rem; - margin: 0 3.15rem; + margin: 0 2rem; flex-wrap: wrap; `; @@ -247,7 +247,8 @@ const HourButton = styled.div<{ isActive ? Green : isBetween ? LightGreen : isBlock ? Grey5 : White}; color: ${({ isActive, isBetween, isBlock }) => isActive ? White : isBetween ? Black : isBlock ? White : Black}; - width: 6rem; + width: 18%; + margin: 3.5%; font-size: 1.4rem; height: 3.4rem; justify-content: center; diff --git a/src/components/Seller/SellerOpenConsult/CommentListSection.tsx b/src/components/Seller/SellerOpenConsult/CommentListSection.tsx index 01f3a96c..00392e06 100644 --- a/src/components/Seller/SellerOpenConsult/CommentListSection.tsx +++ b/src/components/Seller/SellerOpenConsult/CommentListSection.tsx @@ -19,6 +19,7 @@ import { useParams } from 'react-router-dom'; import { isSendPopupOpenState } from 'utils/atom'; import { useRecoilValue } from 'recoil'; import { consultStyleToCharNum } from 'utils/convertStringToCharNum'; +import { formattedMessage } from 'utils/formattedMessage'; export interface commentApiObject { commentId: string; @@ -75,7 +76,7 @@ function CommentListSection() { {card.updatedAt} - {card.content} + {formattedMessage(card.content)} {card.totalLike} diff --git a/src/pages/Seller/SellerOpenConsult.tsx b/src/pages/Seller/SellerOpenConsult.tsx index 86251f50..f3a09033 100644 --- a/src/pages/Seller/SellerOpenConsult.tsx +++ b/src/pages/Seller/SellerOpenConsult.tsx @@ -21,8 +21,13 @@ function SellerOpenConsult() { }} > - - +
+ + +
{isSendPopupOpen && ( <> - + )} From 0ada7154466e2bacfedd2d17425b43e1bf7cf927 Mon Sep 17 00:00:00 2001 From: inyoung Date: Thu, 2 May 2024 19:25:57 +0900 Subject: [PATCH 05/19] Refactor: Maintaining the state of the letter writing page when no category is selected #278 --- src/components/Buyer/BuyerLetterWrite/LetterPostModal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Buyer/BuyerLetterWrite/LetterPostModal.tsx b/src/components/Buyer/BuyerLetterWrite/LetterPostModal.tsx index 0798de8b..ed5052a6 100644 --- a/src/components/Buyer/BuyerLetterWrite/LetterPostModal.tsx +++ b/src/components/Buyer/BuyerLetterWrite/LetterPostModal.tsx @@ -43,6 +43,7 @@ export const LetterPostModal = ({ if (categoryType === 0) { alert('상담 카테고리를 정해주세요.'); setIsActive(false); + return; } else { //첫번째 질문 임시저장 X 메세지 임시저장 수정 try { From ce3d668b7e257fd4c4dd1052b5523b6f37cd2063 Mon Sep 17 00:00:00 2001 From: inyoung Date: Thu, 2 May 2024 20:03:45 +0900 Subject: [PATCH 06/19] Fix: Activate the send button immediately when loading a letter #254 --- .../Seller/SellerLetterWrite/LetterIsSaveModal.tsx | 6 ++++++ .../Seller/SellerLetterWrite/LetterSavePostModal.tsx | 1 + .../Seller/SellerLetterWrite/LetterWriteMainSection.tsx | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/Seller/SellerLetterWrite/LetterIsSaveModal.tsx b/src/components/Seller/SellerLetterWrite/LetterIsSaveModal.tsx index 2a0ba608..f6953d2c 100644 --- a/src/components/Seller/SellerLetterWrite/LetterIsSaveModal.tsx +++ b/src/components/Seller/SellerLetterWrite/LetterIsSaveModal.tsx @@ -6,12 +6,16 @@ interface SaveModalProps { setReplyText: React.Dispatch>; lastModifyDate: string | undefined; saveText: string; + setIsActiveSaveButton: React.Dispatch>; + setIsActivePostButton: React.Dispatch>; } // 임시저장할지 여부 모달 export const LetterIsSaveModal = ({ setIsActive, setReplyText, lastModifyDate, + setIsActivePostButton, + setIsActiveSaveButton, saveText, }: SaveModalProps) => { return ( @@ -31,6 +35,8 @@ export const LetterIsSaveModal = ({ onClick={() => { setIsActive(false); setReplyText(saveText); + setIsActiveSaveButton(true); + setIsActivePostButton(true); }} > 불러오기 diff --git a/src/components/Seller/SellerLetterWrite/LetterSavePostModal.tsx b/src/components/Seller/SellerLetterWrite/LetterSavePostModal.tsx index 1b6d5eac..c6648b3a 100644 --- a/src/components/Seller/SellerLetterWrite/LetterSavePostModal.tsx +++ b/src/components/Seller/SellerLetterWrite/LetterSavePostModal.tsx @@ -10,6 +10,7 @@ interface LetterWriteSavePostModal { isSave: boolean; messageType: string; saveId: string; + } // 임시저장 할까요? 모달 export const LetterSavePostModal = ({ diff --git a/src/components/Seller/SellerLetterWrite/LetterWriteMainSection.tsx b/src/components/Seller/SellerLetterWrite/LetterWriteMainSection.tsx index 6d715bfd..775177f5 100644 --- a/src/components/Seller/SellerLetterWrite/LetterWriteMainSection.tsx +++ b/src/components/Seller/SellerLetterWrite/LetterWriteMainSection.tsx @@ -159,11 +159,15 @@ export const LetterWriteMainSection = ({ setReplyText={setReplyText} setIsActive={setIsActiveSaveModal} lastModifyDate={saveDate} + setIsActivePostButton={setIsActivePostButton} + setIsActiveSaveButton={setIsActiveSaveButton} /> )} {isActiveSavePostModal && ( { setIsActivePostModal(true); }} - isActive={isActiveSaveButton} + isActive={isActivePostButton} disabled={isActivePostButton ? false : true} > 보내기 From da106d0a8776935cab777172f7967376cd864532 Mon Sep 17 00:00:00 2001 From: inyoung Date: Thu, 2 May 2024 20:37:46 +0900 Subject: [PATCH 07/19] Style: ongoingconsultbox style error fix --- .../Seller/Common/OngoingCounsultBox.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/Seller/Common/OngoingCounsultBox.tsx b/src/components/Seller/Common/OngoingCounsultBox.tsx index 96ab4a65..e53dcd75 100644 --- a/src/components/Seller/Common/OngoingCounsultBox.tsx +++ b/src/components/Seller/Common/OngoingCounsultBox.tsx @@ -42,8 +42,12 @@ function OngoingCounsultBox({ reviewCompleted, }: OngoingCounsultBoxProps) { const navigate = useNavigate(); + console.log(categoryStatus); return ( - +
{categoryStatus && (
@@ -107,7 +111,9 @@ function OngoingCounsultBox({ ); } -const OngoingCounsultBoxWrapper = styled.div` +const OngoingCounsultBoxWrapper = styled.div<{ + $categoryStatus: string | undefined; +}>` width: calc(100% - 4rem); box-sizing: border-box; padding: 1.6rem; @@ -122,9 +128,8 @@ const OngoingCounsultBoxWrapper = styled.div` background-color: ${Grey6}; margin: 0 2rem; .button { - display: flex; - width: 6rem; - justify-content: center; + width: fit-content; + min-width: 5.6rem; } .flex-1 { display: flex; @@ -138,7 +143,8 @@ const OngoingCounsultBoxWrapper = styled.div` } .flex-2 { display: flex; - gap: 1.2rem; + gap: ${(props) => + props.$categoryStatus === '썸/연애시작' ? '2.4rem' : '1.2rem'}; } `; From 7ae4ee98e4de02d507d4340b162cddc6bbef0fc3 Mon Sep 17 00:00:00 2001 From: inyoung Date: Thu, 2 May 2024 20:48:14 +0900 Subject: [PATCH 08/19] =?UTF-8?q?Feat:=20=EB=A7=88=EC=9D=B8=EB=8D=94=20?= =?UTF-8?q?=ED=8E=B8=EC=A7=80=20=EB=8B=B5=EC=9E=A5=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=B3=B4=EB=82=B8=20=EC=8B=9C=EA=B0=84=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=EC=97=90=20api=20response=EA=B0=92=EC=9D=98=20updated2=20?= =?UTF-8?q?=EA=B0=92=20=EC=9D=B4=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Seller/Common/OngoingCounsultBox.tsx | 6 +++--- .../Seller/SellerLetterWrite/LetterWriteMainSection.tsx | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/Seller/Common/OngoingCounsultBox.tsx b/src/components/Seller/Common/OngoingCounsultBox.tsx index e53dcd75..b6ebbff1 100644 --- a/src/components/Seller/Common/OngoingCounsultBox.tsx +++ b/src/components/Seller/Common/OngoingCounsultBox.tsx @@ -19,10 +19,10 @@ import { useNavigate } from 'react-router-dom'; import { CartegoryState, ConsultState } from 'utils/type'; interface OngoingCounsultBoxProps { categoryStatus?: string; - consultStatus: string; + consultStatus?: string; counselorName: string | undefined; - beforeMinutes: string | null; - content: string | null; + beforeMinutes: string | undefined | null; + content: string | null | undefined; newMessageCounts: number | null; counselorprofileStatus: number | undefined; onClick?: () => void; diff --git a/src/components/Seller/SellerLetterWrite/LetterWriteMainSection.tsx b/src/components/Seller/SellerLetterWrite/LetterWriteMainSection.tsx index 775177f5..7b1f7eeb 100644 --- a/src/components/Seller/SellerLetterWrite/LetterWriteMainSection.tsx +++ b/src/components/Seller/SellerLetterWrite/LetterWriteMainSection.tsx @@ -14,6 +14,7 @@ import { } from 'api/get'; import { LoadingSpinner } from 'utils/LoadingSpinner'; import { Space } from 'components/Common/Space'; +import { CartegoryState } from 'utils/type'; interface LetterConsultInform { categoryStatus?: CartegoryState; counselorName: string | undefined; @@ -130,7 +131,7 @@ export const LetterWriteMainSection = ({ setConsultInform({ categoryStatus: customerInfoResponse?.data?.category, counselorName: customerInfoResponse?.data?.nickname, - beforeMinutes: '5분 전', // 포매팅 필요 + beforeMinutes: letterResponse?.data?.updatedAt2, counselorprofileStatus: 1, // 포매팅 필요 newMessageCounts: 0, content: letterResponse?.data?.content, @@ -166,8 +167,6 @@ export const LetterWriteMainSection = ({ {isActiveSavePostModal && ( Date: Thu, 2 May 2024 23:41:30 +0900 Subject: [PATCH 09/19] Chore: delete console.log --- src/components/Seller/Common/OngoingCounsultBox.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Seller/Common/OngoingCounsultBox.tsx b/src/components/Seller/Common/OngoingCounsultBox.tsx index b6ebbff1..3adf930a 100644 --- a/src/components/Seller/Common/OngoingCounsultBox.tsx +++ b/src/components/Seller/Common/OngoingCounsultBox.tsx @@ -42,7 +42,6 @@ function OngoingCounsultBox({ reviewCompleted, }: OngoingCounsultBoxProps) { const navigate = useNavigate(); - console.log(categoryStatus); return ( Date: Fri, 3 May 2024 00:08:44 +0900 Subject: [PATCH 10/19] =?UTF-8?q?Fix:=20consult=20category=20init=20value?= =?UTF-8?q?=20setting,=20add=20=EC=97=B0=EC=95=A0=EA=B0=88=EB=93=B1=20cate?= =?UTF-8?q?gory=20#280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Buyer/BuyerWriteOpenConsult/FianlWritePopup.tsx | 10 ++++++++-- src/pages/Buyer/BuyerWriteOpenConsult.tsx | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/Buyer/BuyerWriteOpenConsult/FianlWritePopup.tsx b/src/components/Buyer/BuyerWriteOpenConsult/FianlWritePopup.tsx index ff109a35..27eef8c8 100644 --- a/src/components/Buyer/BuyerWriteOpenConsult/FianlWritePopup.tsx +++ b/src/components/Buyer/BuyerWriteOpenConsult/FianlWritePopup.tsx @@ -36,8 +36,14 @@ function FinalWritePopup({ title, content, category }: FianlWritePopupProps) { alert('작성권한이 없습니다.'); navigate('/consult?type=open-consult'); } else if (res?.response.status === 404) { - alert('존재하지 않는 일대다상담입니다.'); - navigate('/consult?type=open-consult'); + if (res?.response.data.errorName === 'CONSULT_CATEGORY_NOT_FOUND') { + alert('상담 카테고리를 선택해주세요.'); + setIsPostPopupOpen(false); + return; + } else if (res?.data.errorName === 'CONSULT_TYPE_NOT_FOUND') { + alert('존재하지 않는 일대다상담입니다.'); + navigate('/consult?type=open-consult'); + } } } catch (err) { alert(err); diff --git a/src/pages/Buyer/BuyerWriteOpenConsult.tsx b/src/pages/Buyer/BuyerWriteOpenConsult.tsx index a7578621..8652d171 100644 --- a/src/pages/Buyer/BuyerWriteOpenConsult.tsx +++ b/src/pages/Buyer/BuyerWriteOpenConsult.tsx @@ -22,7 +22,9 @@ import { getOneOpenConsult } from 'api/get'; function BuyerWriteOpenConsult() { const navigate = useNavigate(); const [categoryType, setCategoryType] = useState(0); + const categoryList = [ + '상담 카테고리', '연애갈등', '이별/재회', '여자심리', From f180555bddd589ece530143736539ffb4c06a61f Mon Sep 17 00:00:00 2001 From: inyoung Date: Fri, 3 May 2024 01:04:22 +0900 Subject: [PATCH 11/19] Fix: fix style error of open consult card, mapping scrap, like #280 --- src/assets/icons/icon-heart2.svg | 2 +- src/assets/icons/icon-heart4.svg | 3 +++ src/assets/icons/icon-save4.svg | 3 +++ src/assets/icons/icon-save5.svg | 3 +++ src/assets/icons/icon_save2.svg | 5 ++++ src/assets/icons/icon_save3.svg | 5 ++++ .../BuyerOpenConsult/OpenConsultList.tsx | 27 ++++++++++++++++--- 7 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 src/assets/icons/icon-heart4.svg create mode 100644 src/assets/icons/icon-save4.svg create mode 100644 src/assets/icons/icon-save5.svg create mode 100644 src/assets/icons/icon_save2.svg create mode 100644 src/assets/icons/icon_save3.svg diff --git a/src/assets/icons/icon-heart2.svg b/src/assets/icons/icon-heart2.svg index 8784c591..09cf0660 100644 --- a/src/assets/icons/icon-heart2.svg +++ b/src/assets/icons/icon-heart2.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/src/assets/icons/icon-heart4.svg b/src/assets/icons/icon-heart4.svg new file mode 100644 index 00000000..31da7e33 --- /dev/null +++ b/src/assets/icons/icon-heart4.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/icon-save4.svg b/src/assets/icons/icon-save4.svg new file mode 100644 index 00000000..3b135a42 --- /dev/null +++ b/src/assets/icons/icon-save4.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/icon-save5.svg b/src/assets/icons/icon-save5.svg new file mode 100644 index 00000000..144f9355 --- /dev/null +++ b/src/assets/icons/icon-save5.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/icon_save2.svg b/src/assets/icons/icon_save2.svg new file mode 100644 index 00000000..f8f2651c --- /dev/null +++ b/src/assets/icons/icon_save2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icons/icon_save3.svg b/src/assets/icons/icon_save3.svg new file mode 100644 index 00000000..204436c5 --- /dev/null +++ b/src/assets/icons/icon_save3.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx b/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx index a1d51a1d..080be952 100644 --- a/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx +++ b/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx @@ -3,7 +3,9 @@ import styled from 'styled-components'; import { Grey1, Grey2, Grey6 } from 'styles/color'; import { Body1, Caption1 } from 'styles/font'; import { ReactComponent as HeartIcon } from 'assets/icons/icon-heart2.svg'; -import { ReactComponent as SaveIcon } from 'assets/icons/icon-save2.svg'; +import { ReactComponent as HeartEmptyIcon } from 'assets/icons/icon-heart4.svg'; +import { ReactComponent as SaveIcon } from 'assets/icons/icon-save5.svg'; +import { ReactComponent as SaveEmptyIcon } from 'assets/icons/icon-save4.svg'; import { ReactComponent as CommentIcon } from 'assets/icons/icon-comment.svg'; import { Space } from 'components/Common/Space'; import { openConsultApiObject } from 'pages/Buyer/BuyerConsult'; @@ -96,15 +98,16 @@ function OpenConsultList() {
{item.title}
- +
{item.content}
- + {item.isLiked ? : } {item.totalLike} + - + {item.isScrapped ? : } {item.totalScrap} @@ -169,6 +172,8 @@ const BuyerOpenConsultCard = styled.div` line-height: 155%; } .row3 { + position: absolute; + bottom: 1.6rem; display: flex; gap: 1.2rem; } @@ -180,6 +185,20 @@ const IconItem = styled.div` `; const HeartResizeIcon = styled(HeartIcon)` + width: 1.5rem; + height: 1.5rem; +`; + +const HeartEmptyResizeIcon = styled(HeartEmptyIcon)` + width: 2rem; + height: 2rem; +`; + +const SaveResizeIcon = styled(SaveIcon)` + width: 2rem; + height: 2rem; +`; +const SaveEmptyResizeIcon = styled(SaveEmptyIcon)` width: 2rem; height: 2rem; `; From d3fdcba90f080d2e27ef827fe8ed193aa48fc073 Mon Sep 17 00:00:00 2001 From: inyoung Date: Fri, 3 May 2024 01:09:51 +0900 Subject: [PATCH 12/19] =?UTF-8?q?Feat:=20=EB=A7=88=EC=9D=B8=EB=8D=94=20?= =?UTF-8?q?=EA=B3=B5=EA=B0=9C=EC=83=81=EB=8B=B4=20=EB=8B=B5=EB=B3=80=20?= =?UTF-8?q?=EC=B0=BD=EC=97=90=EC=84=9C=20=EC=A2=8B=EC=95=84=EC=9A=94,=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=9E=A9=EB=B7=B0=20=EC=97=86=EC=95=A0?= =?UTF-8?q?=EA=B8=B0=20#280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Buyer/BuyerOpenConsult/OpenConsultList.tsx | 14 -------------- .../SellerOpenConsult/MainQuestionSection.tsx | 4 ++-- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx b/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx index 080be952..9ec1ca5c 100644 --- a/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx +++ b/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx @@ -184,24 +184,10 @@ const IconItem = styled.div` gap: 0.5rem; `; -const HeartResizeIcon = styled(HeartIcon)` - width: 1.5rem; - height: 1.5rem; -`; - -const HeartEmptyResizeIcon = styled(HeartEmptyIcon)` - width: 2rem; - height: 2rem; -`; - const SaveResizeIcon = styled(SaveIcon)` width: 2rem; height: 2rem; `; -const SaveEmptyResizeIcon = styled(SaveEmptyIcon)` - width: 2rem; - height: 2rem; -`; const TimeLeft = styled.div` font-size: 1.2rem; diff --git a/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx b/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx index a9ee6544..6c5f403d 100644 --- a/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx +++ b/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx @@ -46,7 +46,7 @@ function MainQuestionSection() {
- + {/* {card?.totalLike} @@ -55,7 +55,7 @@ function MainQuestionSection() { {card?.totalScrap} - + */} ); } From 2ad925e701e30d09effb4ea89d8bbf30357f2885 Mon Sep 17 00:00:00 2001 From: inyoung Date: Fri, 3 May 2024 01:30:09 +0900 Subject: [PATCH 13/19] Fix: Change res to res2 so that the accept button is visible only to the author #280 --- .../BuyerOpenConsultDetail/CommentCard.tsx | 2 ++ .../CommentListSection.tsx | 3 +- .../SellerOpenConsult/MainQuestionSection.tsx | 32 +++++++++---------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx b/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx index 47ff7eae..f4aa9329 100644 --- a/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx +++ b/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx @@ -13,6 +13,7 @@ import { deleteCommentLikes } from 'api/delete'; import { postLikeComment } from 'api/post'; import { consultStyleToCharNum } from 'utils/convertStringToCharNum'; import { formattedMessage } from 'utils/formattedMessage'; +import { useNavigate } from 'react-router-dom'; interface CommentCardProps { item: commentApiObject; isMyPost: boolean; @@ -31,6 +32,7 @@ function CommentCard({ // 보내기 중복 방지 const [isSending, setIsSending] = useState(false); const [isFirstRendering, setIsFirstRendering] = useState(true); + const navigate = useNavigate(); const handleClickLikeButton = useCallback(async () => { if (isSending) { return; diff --git a/src/components/Buyer/BuyerOpenConsultDetail/CommentListSection.tsx b/src/components/Buyer/BuyerOpenConsultDetail/CommentListSection.tsx index 3c23c615..9062cf1a 100644 --- a/src/components/Buyer/BuyerOpenConsultDetail/CommentListSection.tsx +++ b/src/components/Buyer/BuyerOpenConsultDetail/CommentListSection.tsx @@ -33,7 +33,7 @@ function CommentListSection() { } } const res2: any = await getCustomerIsWriter(id); - if (res2.status === 200) setIsMyPost(res.data); + if (res2.status === 200) setIsMyPost(res2.data); else if (res2?.response.status === 404) { alert('존재하지 않는 게시물입니다.'); navigate('/open-consult'); @@ -49,6 +49,7 @@ function CommentListSection() { }; fetchComment(); }, [id, isPickPopup]); + console.log(isMyPost); return ( <> {isPickPopup && ( diff --git a/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx b/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx index 6c5f403d..edd1d306 100644 --- a/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx +++ b/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx @@ -103,22 +103,22 @@ const Circle = styled.div` background-color: ${Grey3}; `; -const ButtonList = styled.div` - display: flex; - gap: 1.2rem; -`; +// const ButtonList = styled.div` +// display: flex; +// gap: 1.2rem; +// `; -const ButtonItem = styled.div` - border-radius: 0.8rem; - background: ${Grey6}; - display: flex; - padding: 0.6rem 1.2rem 0.6rem 0.6rem; - align-items: center; - gap: 0.4rem; -`; +// const ButtonItem = styled.div` +// border-radius: 0.8rem; +// background: ${Grey6}; +// display: flex; +// padding: 0.6rem 1.2rem 0.6rem 0.6rem; +// align-items: center; +// gap: 0.4rem; +// `; -const SaveResizeIcon = styled(SaveIcon)` - width: 2rem; - height: 2rem; -`; +// const SaveResizeIcon = styled(SaveIcon)` +// width: 2rem; +// height: 2rem; +// `; export default React.memo(MainQuestionSection); From 5e10a05c378b870c3bbf7d98eec00d83abf0268b Mon Sep 17 00:00:00 2001 From: inyoung Date: Sat, 4 May 2024 01:17:44 +0900 Subject: [PATCH 14/19] =?UTF-8?q?Feat:=20=EC=85=B0=EC=96=B4=20=EC=83=81?= =?UTF-8?q?=EB=8B=B4=20=ED=83=AD=20=EA=B3=B5=EA=B0=9C=20=EC=83=81=EB=8B=B4?= =?UTF-8?q?=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=A2=8B=EC=95=84=EC=9A=94,?= =?UTF-8?q?=20=EC=8A=A4=ED=81=AC=EB=9E=A9=20=EC=97=AC=EB=B6=80=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=A5=B8=20=ED=95=98=ED=8A=B8,=20=EB=B6=81=EB=A7=88?= =?UTF-8?q?=ED=81=AC=20=EC=B1=84=EC=9A=B0=EA=B8=B0=20=EC=97=AC=EB=B6=80=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=20#280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Buyer/BuyerConsult/BuyerOpenConsultSection.tsx | 14 +++++++++++--- .../Buyer/BuyerOpenConsult/OpenConsultList.tsx | 4 ++-- .../BuyerOpenConsultDetail/CommentListSection.tsx | 1 - 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx b/src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx index 4cf16d3a..47741d3e 100644 --- a/src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx +++ b/src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx @@ -7,7 +7,9 @@ import { LoadingSpinner } from 'utils/LoadingSpinner'; import { isBuyPopupOpenState } from 'utils/atom'; import { ReactComponent as LockIcon } from 'assets/icons/icon-lock.svg'; import { ReactComponent as HeartIcon } from 'assets/icons/icon-heart2.svg'; -import { ReactComponent as SaveIcon } from 'assets/icons/icon-save2.svg'; +import { ReactComponent as HeartEmptyIcon } from 'assets/icons/icon-heart4.svg'; +import { ReactComponent as SaveIcon } from 'assets/icons/icon-save4.svg'; +import { ReactComponent as SaveEmptyIcon } from 'assets/icons/icon-save5.svg'; import { ReactComponent as CommentIcon } from 'assets/icons/icon-comment.svg'; import { Space } from 'components/Common/Space'; import { BackDrop } from 'components/Common/BackDrop'; @@ -147,11 +149,17 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) {
{item?.content}
- + {item?.isLiked ? ( + + ) : ( + + )} + {item?.totalLike} - + {item?.isScrapped ? : } + {item?.totalScrap} diff --git a/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx b/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx index 9ec1ca5c..7ba8c48f 100644 --- a/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx +++ b/src/components/Buyer/BuyerOpenConsult/OpenConsultList.tsx @@ -4,8 +4,8 @@ import { Grey1, Grey2, Grey6 } from 'styles/color'; import { Body1, Caption1 } from 'styles/font'; import { ReactComponent as HeartIcon } from 'assets/icons/icon-heart2.svg'; import { ReactComponent as HeartEmptyIcon } from 'assets/icons/icon-heart4.svg'; -import { ReactComponent as SaveIcon } from 'assets/icons/icon-save5.svg'; -import { ReactComponent as SaveEmptyIcon } from 'assets/icons/icon-save4.svg'; +import { ReactComponent as SaveIcon } from 'assets/icons/icon-save4.svg'; +import { ReactComponent as SaveEmptyIcon } from 'assets/icons/icon-save5.svg'; import { ReactComponent as CommentIcon } from 'assets/icons/icon-comment.svg'; import { Space } from 'components/Common/Space'; import { openConsultApiObject } from 'pages/Buyer/BuyerConsult'; diff --git a/src/components/Buyer/BuyerOpenConsultDetail/CommentListSection.tsx b/src/components/Buyer/BuyerOpenConsultDetail/CommentListSection.tsx index 9062cf1a..91d7e853 100644 --- a/src/components/Buyer/BuyerOpenConsultDetail/CommentListSection.tsx +++ b/src/components/Buyer/BuyerOpenConsultDetail/CommentListSection.tsx @@ -49,7 +49,6 @@ function CommentListSection() { }; fetchComment(); }, [id, isPickPopup]); - console.log(isMyPost); return ( <> {isPickPopup && ( From 568dfdc5161f2f4bb28f30ae7c4006abb2c6e04c Mon Sep 17 00:00:00 2001 From: inyoung Date: Sat, 4 May 2024 01:20:22 +0900 Subject: [PATCH 15/19] =?UTF-8?q?Fix:=20=EA=B3=B5=EA=B0=9C=EC=83=81?= =?UTF-8?q?=EB=8B=B4=20=EA=B2=B0=EC=A0=9C=20=EC=99=84=EB=A3=8C=EC=8B=9C=20?= =?UTF-8?q?blabla~=20=EC=82=AD=EC=A0=9C=20#280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Buyer/BuyerFinishPayment.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Buyer/BuyerFinishPayment.tsx b/src/pages/Buyer/BuyerFinishPayment.tsx index 21b4288d..c2ab3e5e 100644 --- a/src/pages/Buyer/BuyerFinishPayment.tsx +++ b/src/pages/Buyer/BuyerFinishPayment.tsx @@ -30,7 +30,6 @@ function BuyerFinishPayment() { 상담 신청 완료 - blabla
From e4e747bf6d235b2e218890aebb7325690db15036 Mon Sep 17 00:00:00 2001 From: inyoung Date: Sat, 4 May 2024 01:33:19 +0900 Subject: [PATCH 17/19] =?UTF-8?q?Feat:=20=EC=85=B0=EC=96=B4=20=EA=B3=B5?= =?UTF-8?q?=EA=B0=9C=20=EC=83=81=EB=8B=B4=20=EB=8C=93=EA=B8=80=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=A7=88=EC=9D=B8=EB=8D=94=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=EB=A7=88=EC=9D=B8?= =?UTF-8?q?=EB=8D=94=20=ED=94=84=EB=A1=9C=ED=95=84=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20#280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BuyerOpenConsultDetail/CommentCard.tsx | 25 ++++++++++++++----- .../SellerOpenConsult/CommentListSection.tsx | 1 + 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx b/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx index f4aa9329..ceddfb20 100644 --- a/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx +++ b/src/components/Buyer/BuyerOpenConsultDetail/CommentCard.tsx @@ -66,12 +66,25 @@ function CommentCard({ return (
- - {item.nickName} +
{ + navigate(`/profile/${item.counselorId}`); + }} + style={{ + display: 'flex', + alignItems: 'center', + gap: '0.8rem', + cursor: 'pointer', + }} + > + + {item.nickName} +
{item.updatedAt} diff --git a/src/components/Seller/SellerOpenConsult/CommentListSection.tsx b/src/components/Seller/SellerOpenConsult/CommentListSection.tsx index 00392e06..a063598b 100644 --- a/src/components/Seller/SellerOpenConsult/CommentListSection.tsx +++ b/src/components/Seller/SellerOpenConsult/CommentListSection.tsx @@ -29,6 +29,7 @@ export interface commentApiObject { totalLike: number; consultStyle: string; updatedAt: string; + counselorId: number; isChosen: boolean; } From 2f94f7ab8a0e43bf6ce40a5633d0f921659feaf7 Mon Sep 17 00:00:00 2001 From: inyoung Date: Sat, 4 May 2024 12:35:14 +0900 Subject: [PATCH 18/19] =?UTF-8?q?Chore:=20=EB=82=98=EC=A4=91=EC=97=90=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=A0=20=EC=88=98=EB=8F=84=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=EC=BD=94=EB=93=9C=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20#280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx | 2 +- src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx b/src/components/Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx index 96b218ab..152479c3 100644 --- a/src/components/Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx +++ b/src/components/Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx @@ -90,7 +90,7 @@ ViewProfileMainSectionProps) => { {daysOfWeek?.map( (day: string) => chatTime?.[day]?.length > 0 && ( - + {dayEngtoKor[day] + (chatTime?.[day]?.length === 1 ? ' ' + convertTimeRange(chatTime?.[day][0]) diff --git a/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx b/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx index edd1d306..bc0dbd3b 100644 --- a/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx +++ b/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx @@ -46,6 +46,7 @@ function MainQuestionSection() {
+ {/* 나중에 사용할수도 있는 코드 */} {/* @@ -103,6 +104,7 @@ const Circle = styled.div` background-color: ${Grey3}; `; +// 나중에 사용할 수도 있는 코드 // const ButtonList = styled.div` // display: flex; // gap: 1.2rem; From 91049a44872ff55c0a3e7f7d83674f1daa47ee86 Mon Sep 17 00:00:00 2001 From: inyoung Date: Sat, 4 May 2024 12:36:23 +0900 Subject: [PATCH 19/19] =?UTF-8?q?Chore:=20=EB=82=98=EC=A4=91=EC=97=90=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=A0=20=EC=88=98=EB=8F=84=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=EC=BD=94=EB=93=9C=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=802=20#280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx | 4 +++- .../Seller/SellerOpenConsult/MainQuestionSection.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx b/src/components/Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx index 152479c3..f1fd6781 100644 --- a/src/components/Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx +++ b/src/components/Seller/SellerMyPageViewProfile/ViewProfileMainSection.tsx @@ -139,6 +139,7 @@ ViewProfileMainSectionProps) => {
+ {/* 나중에 사용할 수 도 있는 코드 */} {/* 수익 계좌
@@ -226,7 +227,7 @@ const WhiteBox = styled.div` flex-direction: column; } `; - +// 나중에 사용할 수도 있는 코드 // const AccountWhiteBox = styled(WhiteBox)` // gap: 0.6rem; // & > div { @@ -251,6 +252,7 @@ const IntroduceWhiteBox = styled(WhiteBox)` } `; +// 나중에 사용할 수도 있는 코드 // const AccountTag = styled(Body1)` // width: 10rem; // margin-bottom: 0.4rem; diff --git a/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx b/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx index bc0dbd3b..45dc822b 100644 --- a/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx +++ b/src/components/Seller/SellerOpenConsult/MainQuestionSection.tsx @@ -104,7 +104,7 @@ const Circle = styled.div` background-color: ${Grey3}; `; -// 나중에 사용할 수도 있는 코드 +// 나중에 사용할 수도 있는 코드.. // const ButtonList = styled.div` // display: flex; // gap: 1.2rem;