Skip to content

Commit

Permalink
make name link to merchant, move boost btn
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Apr 23, 2023
1 parent a9e3b5c commit a7a8d7a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
6 changes: 4 additions & 2 deletions src/lib/map/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,11 @@ export const generateMarker = (

popupContainer.innerHTML = `${
element.tags && element.tags.name
? `<span class='block font-bold text-lg text-primary dark:text-white leading-snug max-w-[300px]' title='Merchant 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'>${
element.tags.name
} ${description ? `<span id='description' title='Description'></span>` : ''}</span>`
}</a> ${description ? `<span id='description' title='Description'></span>` : ''}`
: ''
}
Expand Down
40 changes: 20 additions & 20 deletions src/routes/merchant/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -470,24 +470,6 @@
</div>
{/if}
<button
id="boost-button"
on:click={startBoost}
disabled={boostLoading}
class="{boosted
? 'bg-bitcoin hover:bg-bitcoinHover'
: 'bg-link hover:bg-hover'} mx-auto flex items-center justify-center rounded-xl p-3 text-center font-semibold text-white transition-colors"
>
<Icon
w="20"
h="20"
style="text-white mr-1"
icon={boosted ? 'boost-solid' : 'boost'}
type="popup"
/>
{boostLoading ? 'Boosting...' : boosted ? 'Extend Boost' : 'Boost'}
</button>
{#if description}
<p class="mx-auto max-w-[600px] text-primary dark:text-white">{description}</p>
{/if}
Expand Down Expand Up @@ -546,15 +528,15 @@
<strong>{verified[0]}</strong>
</div>
{:else}
<p>This location needs to be surveyed!</p>
<p class="font-semibold">This location needs to be surveyed!</p>
{/if}
<PrimaryButton
text="Verify Location"
link={`/verify-location?${
name ? `&name=${name.replaceAll('&', '%26')}` : ''
}&lat=${lat}&long=${long}&${merchant.osm_json.type}=${merchant.osm_json.id}`}
style="rounded-xl p-3 w-fit mx-auto"
style="rounded-xl p-3 w-40 mx-auto"
/>
</div>
Expand All @@ -575,6 +557,24 @@
>
</p>
{/if}
<button
id="boost-button"
on:click={startBoost}
disabled={boostLoading}
class="{boosted
? 'bg-bitcoin hover:bg-bitcoinHover'
: 'bg-link hover:bg-hover'} mx-auto flex w-40 items-center justify-center rounded-xl p-3 text-center font-semibold text-white transition-colors"
>
<Icon
w="20"
h="20"
style="text-white mr-1"
icon={boosted ? 'boost-solid' : 'boost'}
type="popup"
/>
{boostLoading ? 'Boosting...' : boosted ? 'Extend Boost' : 'Boost'}
</button>
</div>
</div>
</section>
Expand Down

0 comments on commit a7a8d7a

Please sign in to comment.