type RatingHistogramProps = { histogram: number[] } export function RatingHistogram({ histogram }: RatingHistogramProps) { const max = Math.max(...histogram, 1) return (
{histogram.map((count, i) => (
0 ? 2 : 0 }} /> ))}
{[1, 2, 3, 4, 5].map((n) => (
{n}
))}
) }