From 1b90e7184159eddd2ff350a994cb5e2f08f48166 Mon Sep 17 00:00:00 2001 From: Valentyna Dudchak Date: Wed, 4 Dec 2024 20:16:06 +0200 Subject: [PATCH] fixed lint --- src/components/comment/Comment.tsx | 15 +++++++++++++-- .../CommentsWithRatingBlock.tsx | 13 +------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/comment/Comment.tsx b/src/components/comment/Comment.tsx index 456614008..9eb8e2e8e 100644 --- a/src/components/comment/Comment.tsx +++ b/src/components/comment/Comment.tsx @@ -13,11 +13,22 @@ interface CommentProps { } const Comment: FC = ({ review }) => { - const { comment, author, rating, createdAt, offer, proficiencyLevel, targetUserRole } = review + const { + comment, + author, + rating, + createdAt, + offer, + proficiencyLevel, + targetUserRole + } = review const { firstName, lastName, photo, _id } = author const { category, subject } = offer - const authorRole = targetUserRole === UserRoleEnum.Tutor ? UserRoleEnum.Student : UserRoleEnum.Tutor + const authorRole = + targetUserRole === UserRoleEnum.Tutor + ? UserRoleEnum.Student + : UserRoleEnum.Tutor const coopDetails = `${category.name} - ${subject.name} - ${proficiencyLevel}` diff --git a/src/containers/user-profile/comments-with-rating-block/CommentsWithRatingBlock.tsx b/src/containers/user-profile/comments-with-rating-block/CommentsWithRatingBlock.tsx index 5ddbff929..ec3e9b1ee 100644 --- a/src/containers/user-profile/comments-with-rating-block/CommentsWithRatingBlock.tsx +++ b/src/containers/user-profile/comments-with-rating-block/CommentsWithRatingBlock.tsx @@ -15,12 +15,6 @@ import Loader from '~/components/loader/Loader' import { RatingType, SortByEnum, UserRoleEnum, ReviewsResponse } from '~/types' import { styles } from '~/containers/user-profile/comments-with-rating-block/CommentsWithRatingBlock.styles' -import { - responseMock, - loadingMock, - responseMockStudents, - MockReview -} from '~/containers/user-profile/comments-with-rating-block/CommentsWithRatingBlock.constants' import { ReviewService } from '~/services/review-service' import { useAppSelector } from '~/hooks/use-redux' import useAxios from '~/hooks/use-axios' @@ -61,11 +55,6 @@ const CommentsWithRatingBlock = ({ ? 'userProfilePage.reviews.titleTutor' : 'userProfilePage.reviews.titleStudent' - // const items: MockReview[] = - // userRole === UserRoleEnum.Tutor - // ? [...responseMock.items] - // : [...responseMockStudents.items] - const sortItems = Object.values(SortByEnum) const sortMenuItems = sortItems.map((el) => ( @@ -115,7 +104,7 @@ const CommentsWithRatingBlock = ({ return ( {t(titleKey)} - {loadingMock && !response.count ? ( + {loading && !response.count ? ( ) : ( <>