Skip to content

Commit 174e942

Browse files
committed
modif: tutor has been rating and band disabled temporary.
1 parent 9a27eaf commit 174e942

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

apps/web/src/components/TutorProfile/ProfileCard.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useCallback, useEffect, useMemo } from "react";
2-
import Star from "@litespace/assets/Star";
32
import { Void } from "@litespace/types";
43
import cn from "classnames";
54
import { useFormatMessage } from "@litespace/ui/hooks/intl";
@@ -40,8 +39,6 @@ export const ProfileCard: React.FC<{
4039
role,
4140
studentCount,
4241
lessonCount,
43-
avgRating,
44-
ratingCount,
4542
loading,
4643
error,
4744
onBook,
@@ -140,7 +137,8 @@ export const ProfileCard: React.FC<{
140137
"w-[90px] h-[90px] md:w-[242px] md:h-[242px]"
141138
)}
142139
>
143-
{role === IUser.Role.TutorManager && (
140+
{/* TODO: re-enable the recommended band */}
141+
{/* role === IUser.Role.TutorManager && (
144142
<Typography
145143
tag="p"
146144
className={cn(
@@ -152,7 +150,7 @@ export const ProfileCard: React.FC<{
152150
>
153151
{intl("tutor.recommended")}
154152
</Typography>
155-
)}
153+
) */}
156154
<AvatarV2 src={image} alt={name} id={id} object="cover" />
157155
</div>
158156

@@ -200,7 +198,8 @@ export const ProfileCard: React.FC<{
200198
</Typography>
201199
) : null}
202200
</div>
203-
{avgRating > 0 ? (
201+
{/* TODO: re-enable the rating view */}
202+
{/* avgRating > 0 ? (
204203
<div className="flex items-center gap-2">
205204
<Typography
206205
tag="span"
@@ -218,7 +217,7 @@ export const ProfileCard: React.FC<{
218217
({intl("tutor-profile.rating", { count: ratingCount })})
219218
</Typography>
220219
</div>
221-
) : null}
220+
) : null */}
222221
</div>
223222
{sm ? BookButton : null}
224223
</div>

apps/web/src/components/Tutors/TutorCard.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { isEmpty } from "lodash";
1515
import React from "react";
1616
import { Link } from "react-router-dom";
1717
import { useFindTutorRatings } from "@litespace/headless/rating";
18-
import { IUser } from "@litespace/types";
1918

2019
const MAXIMUM_CARD_TOPICS_NUM = 4;
2120

@@ -37,12 +36,10 @@ export const TutorCard: React.FC<{
3736
about,
3837
name,
3938
image,
40-
rating,
4139
topics,
4240
onBook,
4341
buttonSize = "medium",
4442
cardHeight,
45-
role,
4643
}) => {
4744
const intl = useFormatMessage();
4845

@@ -72,7 +69,8 @@ export const TutorCard: React.FC<{
7269
cardHeight || "h-80 max-h-80"
7370
)}
7471
>
75-
{role === IUser.Role.TutorManager && (
72+
{/* TODO: re-enable the recommended band */}
73+
{/* role === IUser.Role.TutorManager && (
7674
<Typography
7775
tag="p"
7876
className={cn(
@@ -84,7 +82,7 @@ export const TutorCard: React.FC<{
8482
>
8583
{intl("tutor.recommended")}
8684
</Typography>
87-
)}
85+
) */}
8886
<AvatarV2 src={image} alt={name} id={tutorId} object="cover" />
8987
</div>
9088

@@ -96,7 +94,8 @@ export const TutorCard: React.FC<{
9694
>
9795
{name}
9896
</Typography>
99-
{rating ? <Rating tutorId={tutorId} rating={rating} /> : null}
97+
{/* TODO: re-enable the ratings once view */}
98+
{/* rating ? <Rating tutorId={tutorId} rating={rating} /> : null */}
10099
</div>
101100
<Optional show={!!about}>
102101
<Typography
@@ -161,7 +160,7 @@ export const TutorCard: React.FC<{
161160
);
162161
};
163162

164-
const Rating: React.FC<{ tutorId: number; rating: number }> = ({
163+
export const Rating: React.FC<{ tutorId: number; rating: number }> = ({
165164
tutorId,
166165
rating,
167166
}) => {

0 commit comments

Comments
 (0)