Skip to main content

LocationsList

packages/leisure/components/organisms/LocationsList.js · Tier: organism · Module: leisure · Rendering: Server Component (async)

Purpose​

Fetches one page of standalone city places (optionally filtered by category) and renders the card grid with pagination, plus fetch-error and empty states. Staff see a "create location" card in the grid and in the empty state.

Props​

PropTypeRequiredDefaultDescription
langstringyes—Locale.
pagenumberyes—Page index.
activeCategorystring | nullyes—Category filter.
accessTokenstring | undefinedyes—Bearer token.
canCreatebooleanyes—Shows the create card.
tobjectyes—tourism.locations dictionary.
unitsobjectyes—tourism.units dictionary (for durations).
pageHref(pageNumber) => stringyes—Pager href builder.

Behaviour​

await getCityPlaces({ page, category }, accessToken); cards show a category fallback icon and an optional visit-duration extra.

Composition​

  • Uses: molecules/core/CatalogueCard, molecules/core/FetchErrorBanner, molecules/core/SectionPager, molecules/leisure/CreateCard, atoms/core/Icon, getCityPlaces + format utils.
  • Used by: the tourism locations list page.

Internationalisation​

Copy from tourism.locations; durations formatted with units.

Accessibility​

<section aria-labelledby> with an <h2>.

organisms/leisure/LocationFilters, organisms/leisure/PlaceDetailView, molecules/core/CatalogueCard.