From 705aec2a7454ee6607fe53f1fa9004bf81f039aa Mon Sep 17 00:00:00 2001 From: sriram Date: Mon, 5 Oct 2026 11:25:35 +0530 Subject: [PATCH] Frontend changes in rating and revies of customers --- frontend/src/components/ProductModal.jsx | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/ProductModal.jsx b/frontend/src/components/ProductModal.jsx index 80597c8..f4090eb 100644 --- a/frontend/src/components/ProductModal.jsx +++ b/frontend/src/components/ProductModal.jsx @@ -48,7 +48,14 @@ function formatReviewDate(value) { function RatingsAndReviews({ rating, reviews }) { return (
-

Ratings & reviews

+
+

Customer experience

+ {rating && ( +

+ Published by {[...new Set(rating.sources.map((s) => s.site))].join(', ')} +

+ )} +
{rating ? ( @@ -62,6 +69,21 @@ function RatingsAndReviews({ rating, reviews }) { {rating.count ? `${rating.count.toLocaleString('en-IN')} ratings across ` : 'Across '} {rating.sources.length} platform{rating.sources.length === 1 ? '' : 's'}

+ {rating.breakdown && ( +
    + {rating.breakdown.map((b) => ( +
  • + + {b.stars} + + + + + {b.percent}% +
  • + ))} +
+ )}
    {rating.sources.map((s) => (