X Enterprises
Pages

Restaurant Reviews

The /restaurants/:slug/reviews route — displays customer reviews with a load-more pattern.

Restaurant Reviews

The /restaurants/:slug/reviews child page renders the restaurant's customer reviews with a load-more pattern. Review data is injected from the parent layout. Each review is rendered using XRDProfileReviewsItem inside the XRDProfileReviews container.

Route

/restaurants/:slug/reviews

Components Used

ComponentRole
XRDProfileReviewsContainer that manages the visible review count and load-more state.
XRDProfileReviewsItemIndividual review card with author, rating, date, and body text.
XRDStarRatingStar rating display used within each review item.

Data Fetching

Review data (Review[]) is injected from the parent restaurants/[slug].vue layout, which fetched it via useRestaurant(slug).getRestaurantReviews(). The load-more behaviour is handled client-side by XRDProfileReviews without additional API calls.


AI Context

route: /restaurants/:slug/reviews
package: "@xenterprises/nuxt-x-restaurants"
use-when: >
  Rendering the reviews tab on a restaurant profile. Data is provided
  by the parent layout via inject. Load-more pagination is handled
  client-side by XRDProfileReviews.
Copyright © 2026