CinemaCard component renders a clickable card for a cinema with its name and display location.
Props
Cinema object containing the cinema data. Must include:
id: Cinema IDname: Cinema namelocation: Short location name (optional)verbose_location: Full location description (optional)
Custom link URL for the card. If not provided, defaults to
/cinemas/{id}-{slugified-name}Features
- Display location: Automatically uses
verbose_locationif available, otherwise falls back tolocation - Hover effects: Card background becomes slightly transparent, cinema name changes to accent color
- Automatic slugification: Generates SEO-friendly URLs from cinema names
Usage
Basic Example
Custom Link
Styling
The component uses Tailwind CSS classes and relies on the following CSS variables from your theme:bg-secondary: Card background colortext-accent: Hover text colortext-gray-400: Location text color
Type Definition
TheCinema type is defined in src/lib/queries.ts:
Helper Function
The component uses thegetDisplayLocation() helper function: