Skip to main content

Delivery

Collects and validates a delivery address, checks if the address falls within the merchant’s delivery zone, and displays estimated delivery time and fees.

Preview

View in Storybook

Import

import { Delivery } from '@/components/Delivery'

Usage

<Delivery
  locationId={locationId}
  onAddressConfirmed={handleAddressConfirmed}
/>

Props

locationId
string
required
The location ID to check delivery zones against.
onAddressConfirmed
(address: DeliveryAddress) => void
required
Callback fired when a valid delivery address is confirmed.

Behavior

  • Google Places autocomplete for address input
  • Validates address against the location’s delivery zones
  • Shows “Outside delivery area” error for out-of-range addresses
  • Displays delivery fee and estimated time for valid addresses
  • Optional delivery instructions text field