import { lazy, Suspense } from 'react'; import ClientOnly from '../../../components/ClientOnly'; import SidebarCard from './SidebarCard'; import { formatBreweryAddress } from '../utils/format-address'; import type { BreweryLocation } from '../breweries.server'; const BreweryLocationMap = lazy(() => import('./BreweryLocationMap')); interface LocationCardProps { breweryName: string; location: BreweryLocation; website: string; } const MAP_PLACEHOLDER_CLASS = 'skeleton h-45 w-full rounded-field'; const LocationCard = ({ breweryName, location, website }: LocationCardProps) => ( {location.coordinates && ( }> {() => ( }> )} )}

{formatBreweryAddress(location)}

{website}

); export default LocationCard;