Skip to content

Commit

Permalink
Merge branch 'dev' into l10n_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Feb 27, 2024
2 parents c2f832f + bfaac08 commit 3ed8942
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const forLocationCard = async ({ input }: TRPCHandlerParams<TForLocationC
postCode: true,
latitude: true,
longitude: true,
notVisitable: true,
country: { select: { cca2: true } },
govDist: { select: { abbrev: true, tsKey: true, tsNs: true } },
phones: {
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/components/sections/LocationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const LocationCard = ({ remoteOnly, locationId, edit }: LocationCardProps
})

useEffect(() => {
if (mapIsReady && map && data?.latitude && data?.longitude && canGetCenter) {
if (mapIsReady && map && data?.latitude && data?.longitude && canGetCenter && !data?.notVisitable) {
mapMarker.add({
map,
id: data.id,
Expand Down Expand Up @@ -251,7 +251,7 @@ export const LocationCard = ({ remoteOnly, locationId, edit }: LocationCardProps
<Stack spacing={12}>
<Title order={2}>{data.name}</Title>
<List {...listProps}>
<List.Item>{formattedAddress}</List.Item>
{!data.notVisitable && <List.Item>{formattedAddress}</List.Item>}
{formattedPhone && <List.Item>{formattedPhone}</List.Item>}
</List>
</Stack>
Expand Down

0 comments on commit 3ed8942

Please sign in to comment.