Show users average star rating using rating component

I have a doctor app and I want the users to be able to rate the doctor on the doctor’s page and I want to show the average rating of the doctor out of 5 on the same doctor page
so it’s like this, on the doctor profile page there is a rating preview that updates each time the rating changes and an add rating button using the star rating component.

can anyone please help with this cuz the star rating component is not that easy to implement for beginners and there is not much content explaining it out there.

You need a collection of “ratings” that is related to the doctor. Then you should be able to set the star rating component to show “current doctor>ratings>average”. On the “add rating” component. It should create a record in the “ratings” collection and update it to relate the the “current doctor”

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.