Skip to main content

StaysPanel

packages/mobility/components/organisms/StaysPanel.js · Tier: organism · Module: mobility · Rendering: Client Component ('use client')

Purpose​

Splits the user's reservations into active and past buckets and renders each as a responsive card grid. It owns the renewal modal so any active card can trigger it without lifting state to the page.

Props​

PropTypeRequiredDefaultDescription
reservationsArray<object>yes—The user's reservations.
labelsobjectyes—Panel + card copy.
renewLabelsobjectyes—Renewal-modal copy.
langstringyes—Locale.

Behaviour​

useMemo partitions reservations by expiresAt/active into active vs past; selecting an active card sets the renew target for RenewStayModal.

Composition​

  • Uses: molecules/mobility/StayCard, molecules/mobility/RenewStayModal, useState/useMemo.
  • Used by: the /mobility/my-stays page.

Internationalisation​

Copy via labels / renewLabels.

Accessibility​

Card grids with labelled renew actions; the renewal modal is accessible.

molecules/mobility/StayCard, molecules/mobility/RenewStayModal.