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
| Component | Role |
|---|---|
XRDProfileReviews | Container that manages the visible review count and load-more state. |
XRDProfileReviewsItem | Individual review card with author, rating, date, and body text. |
XRDStarRating | Star 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.
