Skip to main content

RoutesList

packages/leisure/components/organisms/RoutesList.js · Tier: organism · Module: leisure · Rendering: Server Component

Purpose​

A card grid of city routes with pagination, plus fetch-error and empty states. Staff see a "create route" card as the first item in the grid. Unlike EventsList, the data is fetched by the page and passed in as props.

Props​

PropTypeRequiredDefaultDescription
langstringyes—Locale.
tobjectyes—tourism.routes dictionary.
unitsobjectyes—tourism.units dictionary.
canCreatebooleanyes—Shows the create card.
fetchErrorbooleanyes—Renders the error banner.
routesobject[]yes—The route page content.
pagenumberyes—Page index.
totalPagesnumberyes—Total pages.
pageHref(pageNumber) => stringyes—Pager href builder.

Composition​

  • Uses: molecules/core/CatalogueCard, molecules/core/FetchErrorBanner, molecules/core/SectionPager, molecules/leisure/CreateCard, atoms/core/Icon, formatDuration.
  • Used by: the tourism routes list page.

Internationalisation​

Copy from tourism.routes; place counts and durations use t/units.

Accessibility​

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

organisms/leisure/RouteDetailView, organisms/leisure/LocationsList, molecules/core/CatalogueCard.