Skip to content

Commit

Permalink
Merge pull request #359 from sharemindteam/feat/add_total_consult_sav…
Browse files Browse the repository at this point in the history
…ed_348

feat: remove optional condition to counselor card `totalConsult` (#348)
  • Loading branch information
rmdnps10 authored Jul 21, 2024
2 parents 13345cd + c7590d0 commit 9406aa7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export const SavedCounselorResults = () => {
level={value.level}
rating={value.ratingAverage}
totalReview={value.totalReview}
totalConsult={value.totalConsult}
/>
);
})}
Expand Down
11 changes: 3 additions & 8 deletions src/components/Common/CounselorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface CounselorCardProps {
isWishList: boolean;
rating: number;
totalReview: number;
totalConsult?: number;
totalConsult: number;
isRealtime?: boolean;
consultStyle?: number;
}
Expand Down Expand Up @@ -176,13 +176,8 @@ const CounselorCard = ({
<Caption2 color={Grey1}>{'LV. ' + level}</Caption2>
</Flex>
<Flex gap="0.8rem">
{/* TODO: TotalConsult is changed to optional, because get wishlist do not return total consult. It should be added later */}
{totalConsult ? (
<>
<Body3 color={Grey2}>상담 {totalConsult}</Body3>
<Divider />
</>
) : null}
<Body3 color={Grey2}>상담 {totalConsult}</Body3>
<Divider />
<Body3 color={Grey2}>후기 {totalReview}</Body3>
<Divider />
<Flex gap="0.2rem">
Expand Down
1 change: 1 addition & 0 deletions src/utils/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export type WishlistDataType = {
nickname: string;
ratingAverage: number;
totalReview: number;
totalConsult: number;
};

export interface PaymentInfo {
Expand Down

0 comments on commit 9406aa7

Please sign in to comment.