mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
Reformat with Prettier's updated line-wrapping for ternaries and JSX.
This commit is contained in:
@@ -61,7 +61,13 @@ const CurrentLocationMarker = ({ position }: { position: LatLngTuple }) => (
|
||||
|
||||
const CURRENT_LOCATION_ZOOM = 6;
|
||||
|
||||
const RecenterMap = ({ bounds, currentLocation }: { bounds: LatLngTuple[]; currentLocation: LatLngTuple | null }) => {
|
||||
const RecenterMap = ({
|
||||
bounds,
|
||||
currentLocation,
|
||||
}: {
|
||||
bounds: LatLngTuple[];
|
||||
currentLocation: LatLngTuple | null;
|
||||
}) => {
|
||||
const map = useMap();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -77,10 +83,7 @@ const RecenterMap = ({ bounds, currentLocation }: { bounds: LatLngTuple[]; curre
|
||||
|
||||
const BreweryMap = ({ breweries }: BreweryMapProps) => {
|
||||
const currentLocation = useCurrentLocation();
|
||||
const bounds: LatLngTuple[] = breweries.map((brewery) => [
|
||||
brewery.latitude,
|
||||
brewery.longitude,
|
||||
]);
|
||||
const bounds: LatLngTuple[] = breweries.map((brewery) => [brewery.latitude, brewery.longitude]);
|
||||
|
||||
return (
|
||||
<MapContainer
|
||||
|
||||
@@ -7,8 +7,7 @@ interface FeaturedBreweryCardProps {
|
||||
onShowOnMap: () => void;
|
||||
}
|
||||
|
||||
// Founded year, beers-listed count, and house style aren't tracked anywhere yet -
|
||||
// see BREWERY_INDEX_HANDOFF.md. Filler until those fields/queries exist.
|
||||
// see BREWERY_INDEX_HANDOFF.md
|
||||
const FILLER_STATS = [
|
||||
{ label: 'Founded', value: '2014' },
|
||||
{ label: 'Beers listed', value: '18' },
|
||||
|
||||
@@ -98,7 +98,9 @@ const NearbyBreweryMap = ({
|
||||
>
|
||||
<Popup>
|
||||
<p className="font-semibold font-serif">{pin.name}</p>
|
||||
{pin.cityLabel && <p className="text-sm text-base-content/70">{pin.cityLabel}</p>}
|
||||
{pin.cityLabel && (
|
||||
<p className="text-sm text-base-content/70">{pin.cityLabel}</p>
|
||||
)}
|
||||
<a href={`/breweries/${pin.id}`} className="link link-primary text-sm">
|
||||
View brewery →
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user