import { Link } from 'react-router'; import type { Brewery } from '../../breweries.server'; interface RecentBreweriesProps { breweries: Brewery[]; } const RecentBreweries = ({ breweries }: RecentBreweriesProps) => { if (breweries.length === 0) return null; return (

Recently added

{breweries.map((brewery) => (

{brewery.breweryName}

{brewery.location && (
{brewery.location.cityName},{' '} {brewery.location.stateProvinceCode}
)}

{brewery.description}

View brewery →
))}
); }; export default RecentBreweries;