diff --git a/src/components/EventStats/Statistics/AverageRating.tsx b/src/components/EventStats/Statistics/AverageRating.tsx index dac7b208df..a3769934d8 100644 --- a/src/components/EventStats/Statistics/AverageRating.tsx +++ b/src/components/EventStats/Statistics/AverageRating.tsx @@ -10,7 +10,7 @@ type ModalPropType = { data: { event: { _id: string; - averageFeedbackScore: number | null; + averageFeedbackScore: number; feedback: FeedbackType[]; }; }; @@ -41,12 +41,12 @@ export const AverageRating = ({ data }: ModalPropType): JSX.Element => {

Average Review Score

- Rated {(data.event.averageFeedbackScore || 0).toFixed(2)} / 10 + Rated {data.event.averageFeedbackScore.toFixed(2)} / 5 } diff --git a/src/components/EventStats/Statistics/Feedback.tsx b/src/components/EventStats/Statistics/Feedback.tsx index 6a78e29884..ff4fe7a647 100644 --- a/src/components/EventStats/Statistics/Feedback.tsx +++ b/src/components/EventStats/Statistics/Feedback.tsx @@ -25,15 +25,10 @@ type FeedbackType = { export const FeedbackStats = ({ data }: ModalPropType): JSX.Element => { const ratingColors = [ '#57bb8a', // Green - '#73b87e', '#94bd77', - '#b0be6e', '#d4c86a', - '#f5ce62', '#e9b861', - '#ecac67', '#e79a69', - '#e2886c', '#dd776e', // Red ]; @@ -45,13 +40,13 @@ export const FeedbackStats = ({ data }: ModalPropType): JSX.Element => { }); const chartData = []; - for (let rating = 0; rating <= 10; rating++) { + for (let rating = 0; rating <= 5; rating++) { if (rating in count) chartData.push({ id: rating, value: count[rating], label: `${rating} (${count[rating]})`, - color: ratingColors[10 - rating], + color: ratingColors[5 - rating], }); } diff --git a/src/components/EventStats/Statistics/Review.tsx b/src/components/EventStats/Statistics/Review.tsx index 0528de79d3..b5aecd61de 100644 --- a/src/components/EventStats/Statistics/Review.tsx +++ b/src/components/EventStats/Statistics/Review.tsx @@ -42,7 +42,7 @@ export const ReviewStats = ({ data }: ModalPropType): JSX.Element => { reviews.map((review) => (
- +

{review.review}