Skip to content

Commit

Permalink
fix popup name display and move address to var
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Apr 23, 2023
1 parent a7a8d7a commit a0b7505
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/map/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ export const generateMarker = (
element.tags && element.tags.name
? `<a href='/merchant/${element.type}:${
element.id
}' class='font-bold text-lg text-link hover:text-hover transition-colors leading-snug max-w-[300px]' title='Merchant name'>${
}' class='inline-block font-bold text-lg text-link hover:text-hover transition-colors leading-snug max-w-[300px]' title='Merchant name'>${
element.tags.name
}</a> ${description ? `<span id='description' title='Description'></span>` : ''}`
: ''
Expand Down
9 changes: 6 additions & 3 deletions src/routes/merchant/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
const name = merchant.osm_json.tags?.name || '';
const icon = merchant.tags['icon:android'];
const address = merchant.osm_json.tags ? checkAddress(merchant.osm_json.tags) : '';
const description = merchant.osm_json.tags?.description || '';
const hours = merchant.osm_json.tags?.['opening_hours'] || '';
const payment = merchant.tags['payment:uri']
Expand Down Expand Up @@ -317,9 +318,11 @@
{name ? name : 'BTC Map Merchant'}
</h1>
<h2 class="text-xl text-primary dark:text-white">
{merchant.osm_json.tags && checkAddress(merchant.osm_json.tags)}
</h2>
{#if address}
<h2 class="text-xl text-primary dark:text-white">
{address}
</h2>
{/if}
<a
href={`/map?lat=${lat}&long=${long}`}
Expand Down

0 comments on commit a0b7505

Please sign in to comment.