Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove optional condition to counselor card totalConsult (#348) #359

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading