mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
10 lines
412 B
TypeScript
10 lines
412 B
TypeScript
import type { BreweryLocation } from '../breweries.server';
|
|
|
|
export const formatBreweryAddress = (location: BreweryLocation): string => {
|
|
const streetLine = location.addressLine2
|
|
? `${location.addressLine1}, ${location.addressLine2}`
|
|
: location.addressLine1;
|
|
|
|
return `${streetLine}, ${location.cityName}, ${location.stateProvinceCode} ${location.postalCode}, ${location.countryName}`;
|
|
};
|