From 5f7e51a9c1d999544670f92571dd5647d8652370 Mon Sep 17 00:00:00 2001 From: PineND Date: Sat, 21 Dec 2024 22:24:03 -0800 Subject: [PATCH] minor fixes --- .../Ratings/helper/RatingsContainerHelper.tsx | 16 ++++++++-------- .../src/components/Class/Ratings/index.tsx | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/frontend/src/components/Class/Ratings/helper/RatingsContainerHelper.tsx b/apps/frontend/src/components/Class/Ratings/helper/RatingsContainerHelper.tsx index 7c68e6068..416450e95 100644 --- a/apps/frontend/src/components/Class/Ratings/helper/RatingsContainerHelper.tsx +++ b/apps/frontend/src/components/Class/Ratings/helper/RatingsContainerHelper.tsx @@ -394,11 +394,11 @@ export const ratingDelete = async ( await Promise.all(deletePromises); }; -export const getRatingsCount = (ratingsData: RatingDetailProps[]): number => { - if (!ratingsData?.length) return 0; - return Math.max( - ...ratingsData.map((metric) => - metric.stats.reduce((total, stat) => total + stat.count, 0) - ) - ); -}; +// export const getRatingsCount = (ratingsData: RatingDetailProps[]): number => { +// if (!ratingsData?.length) return 0; +// return Math.max( +// ...ratingsData.map((metric) => +// metric.stats.reduce((total, stat) => total + stat.count, 0) +// ) +// ); +// }; diff --git a/apps/frontend/src/components/Class/Ratings/index.tsx b/apps/frontend/src/components/Class/Ratings/index.tsx index c93ba8008..e790af29f 100644 --- a/apps/frontend/src/components/Class/Ratings/index.tsx +++ b/apps/frontend/src/components/Class/Ratings/index.tsx @@ -29,7 +29,6 @@ import { RatingDetailProps, RatingDetailView, RatingUserSummary, - getRatingsCount, ratingDelete, ratingSubmit, } from "./helper/RatingsContainerHelper";