From 1db636f2c8724f2042ec5ee676c4dfabcc3da2e4 Mon Sep 17 00:00:00 2001 From: Grace Sawatyanon Date: Sun, 4 May 2025 18:23:54 -0400 Subject: [PATCH] Add documentation for ReviewHeader.tsx --- frontend/src/components/Review/ReviewHeader.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/src/components/Review/ReviewHeader.tsx b/frontend/src/components/Review/ReviewHeader.tsx index a81a1d5e..371a16ab 100644 --- a/frontend/src/components/Review/ReviewHeader.tsx +++ b/frontend/src/components/Review/ReviewHeader.tsx @@ -9,6 +9,18 @@ type Props = { readonly aveRatingInfo: RatingInfo[]; }; +/** + * ReviewHeader – Displays the visualization for the ratings of different review categories. + * + * @remarks + * This component is used to present the ratings for reviews and pages for different categories + * such as Communication and Location etc. + * + * @param {RatingInfo[]} props.aveRatingInfo – An array of average rating data where each contains + * the category name (`feature`) and its rating (`rating`). + * + * @return {ReactElement} – The responsive layout displaying the labeled rating bars for each category. + */ export default function ReviewHeader({ aveRatingInfo }: Props): ReactElement { const [isMobile, setIsMobile] = useState(false);