Skip to main content

CarsPanel

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

Purpose​

Renders the user's car collection with a CTA to register a new one, owning the open/close state of the AddCarModal. Pure client component; the parent page fetches the cars server-side and passes them down.

Props​

PropTypeRequiredDefaultDescription
carsArray<object>yes—The user's registered cars.
labelsobjectyes—Panel + modal copy.
langstringyes—Locale.

Composition​

  • Uses: molecules/mobility/CarCard, molecules/mobility/AddCarModal, atoms/core/Icon/Button, useState.
  • Used by: the /mobility/cars page.

Internationalisation​

All copy via labels.

Accessibility​

Empty state and add CTA are labelled; the modal is accessible.

molecules/mobility/CarCard, molecules/mobility/AddCarModal.