Skip to Content
Urban Cowboy
Components

Match Or Browse Screen

Choice screen between a guided match and browsing the full room catalogue.

MatchOrBrowseScreen asks the guest whether to be matched to a room or to see every option. It receives already-resolved SearchCriteria and an optional availability count; it performs no fetch itself. The docs fixture uses a fixed three-night Catskills stay.

*
number

Props

PropValuesNotes
criteriaSearchCriteriaFixed dates, guests and property in docs
availableCountnumberOptional count shown in the browse action
onFindYourStaycallbackBegin guided matching
onShowAllRoomscallbackOpen the full catalogue
onChangeDatescallbackReturn to the date selector

Responsive behaviour

The two choices stack on phones and sit side by side from sm up. The date summary wraps within its card, so long formatting does not push the actions off-screen.

Usage

import { MatchOrBrowseScreen } from '@/components/booking/discovery/MatchOrBrowseScreen';

<MatchOrBrowseScreen
  criteria={criteria}
  availableCount={12}
  onFindYourStay={startMatch}
  onShowAllRooms={showAll}
  onChangeDates={editDates}
/>

View source