import { Link } from 'react-router'; import type { Brewery } from '../../breweries.server'; import { formatBreweryAddress } from '../../utils/format-address'; interface BreweryCardProps { brewery: Brewery; } const BreweryCard = ({ brewery }: BreweryCardProps) => (

{brewery.breweryName}

{brewery.location && (

{brewery.location.cityName}, {brewery.location.stateProvinceCode}

)} {brewery.description && (

{brewery.description}

)} {brewery.location && (

{formatBreweryAddress(brewery.location)}

)} {brewery.location?.coordinates && ( e.stopPropagation()} className="link link-primary text-sm mt-2 self-start" > View on map → )}
); export default BreweryCard;