From 78fe77d9448e52e546bc15bd45a0fbb7b35307cb Mon Sep 17 00:00:00 2001 From: Grace Sawatyanon Date: Thu, 24 Apr 2025 15:10:47 -0400 Subject: [PATCH] Add review header documentation --- 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..7c0b60c9 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 Component – Displays a visual summary of average ratings. + * + * @remarks + * This is used for user reviews, the apartment page, and the landlord page to show the + * rating in the different categories. + * + * @param {RatingInfo[]} props.aveRatingInfo - An array of average ratings, each containing a + * name for the rating category and a numeric rating value. + * + * @returns {ReactElement} The rendered ReviewHeader component. + */ export default function ReviewHeader({ aveRatingInfo }: Props): ReactElement { const [isMobile, setIsMobile] = useState(false);