Skip to content

Commit

Permalink
Merge pull request #163 from sharemindteam/feat/api-ongoing-consult
Browse files Browse the repository at this point in the history
[Feature] 마인더 진행중인 상담 api 연동 오류 해결
  • Loading branch information
kyuhho authored Mar 14, 2024
2 parents 458017f + 0ccd50d commit 451b298
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/components/Seller/Common/OngoingCounsultBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ interface OngoingCounsultBoxProps {
counselorprofileStatus: number | undefined;
onClick?: () => void;
reviewCompleted?: boolean;
isChat: boolean;
}
function OngoingCounsultBox({
categoryStatus,
consultStatus,
counselorName,
beforeMinutes,
isChat,
counselorprofileStatus,
content,
newMessageCounts = 0,
Expand Down
16 changes: 10 additions & 6 deletions src/components/Seller/SellerHome/OnGoingConsultSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function OnGoingConsultSection() {
};
fetchOngoingConsult();
}, []);
console.log(totalNum);
return (
<>
<ContentTag
Expand Down Expand Up @@ -57,18 +56,23 @@ function OnGoingConsultSection() {
consult?.map((item: any) => (
<OngoingCounsultBox
key={item?.id}
isChat={item?.isChat}
consultStatus={item?.status}
counselorName={item?.opponentNickname}
beforeMinutes={null}
beforeMinutes={item?.latestMessageUpdatedAt}
content={
item?.status === '질문 대기'
? '셰어의 질문이 도착할 때까지 조금만 기다려주세요! '
: item?.lastMessageContent
? '셰어의 질문이 도착할 때까지 조금만 기다려주세요!'
: item?.latestMessageContent
}
newMessageCounts={1}
newMessageCounts={item?.unreadMessageCount}
counselorprofileStatus={consultStyleToCharNum(item?.consultStyle)}
onClick={() => {
navigate(`/minder/letter/${item?.id}`);
if (item?.isChat) {
navigate(`/minder/chat/${item?.id}`);
} else {
navigate(`/minder/letter/${item?.id}`);
}
}}
/>
))
Expand Down

0 comments on commit 451b298

Please sign in to comment.