X Enterprises
Profile

XRDProfilePopularInArea

Popular in [neighborhood]

XRDProfilePopularInArea

Bottom-of-profile section showing up to 4 top-rated restaurants in the same neighborhood as the current one. Used as an alternative to "People also viewed" (which requires user accounts).

Ranking logic

  • Filters restaurants to the same neighborhood (or addressLocality fallback) as the current profile
  • Excludes the current restaurant itself
  • Sorts by averageRating descending, then by ratingCount descending
  • Returns top 4

Usage

<XRDProfilePopularInArea :restaurant="restaurant ?? null" />

Fetches the full restaurant list via useDomain().getRestaurants({ limit: 50 }) and computes results client-side. No additional props or config needed.

Display

Renders a section below XRDProfileSimilar with:

  • Section header: "Popular in neighborhood name"
  • 4-card grid (responsive)

When no other restaurants match the neighborhood, the section is hidden.


AI Context

component: XRDProfilePopularInArea
package: "@xenterprises/nuxt-x-restaurants"
use-when: >
  Adding "popular nearby" cross-sell at the bottom of profile pages.
  Pure client-side query, no auth needed. Sorts same-neighborhood
  restaurants by rating then review count.
Copyright © 2026