Skip to main content

SpacesList

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

Purpose​

A card grid of public (sports) spaces with pagination, plus fetch-error and empty states. Administrators see a "create space" card in the grid and in the empty state.

Props​

PropTypeRequiredDefaultDescription
langstringyes—Locale.
tobjectyes—leisure.sportsSpaces dictionary.
canManagebooleanyes—Shows the create card.
fetchErrorbooleanyes—Renders the error banner.
spacesobject[]yes—The space 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.
  • Used by: the sports-spaces list page.

Internationalisation​

Copy from leisure.sportsSpaces.

Accessibility​

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

organisms/leisure/SpaceDetailView, organisms/leisure/SpaceResourcesPanel, molecules/core/CatalogueCard.