Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmman committed Nov 5, 2024
1 parent 11d1b4d commit d9b97ba
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/reviews/reviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,23 @@ interface ReviewsProps {
}

export function Reviews({ reviews }: ReviewsProps): React.JSX.Element {
const reviewsAvailable = reviews && reviews.length != 0;
return (
<section className="offer__reviews reviews">
<ReviewsList reviews={reviews} />
{reviewsAvailable ? (
<ReviewsList reviews={reviews} />
) : (
<span
className="reviews__item"
style={{
justifyContent: 'center',
fontSize: 12,
color: 'lightgray',
}}
>
No reviews available
</span>
)}
<ReviewForm />
</section>
);
Expand Down

0 comments on commit d9b97ba

Please sign in to comment.