Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PineND committed Dec 22, 2024
1 parent 52d4221 commit 5f7e51a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
// )
// );
// };
1 change: 0 additions & 1 deletion apps/frontend/src/components/Class/Ratings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
RatingDetailProps,
RatingDetailView,
RatingUserSummary,
getRatingsCount,
ratingDelete,
ratingSubmit,
} from "./helper/RatingsContainerHelper";
Expand Down

0 comments on commit 5f7e51a

Please sign in to comment.