Skip to content

Commit

Permalink
fix: Copy link should be on the item page
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarsen136 committed Apr 7, 2023
1 parent 6f596ae commit f202dca
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions components/collection/HeroButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<NeoButton icon="share-alt" class="square-32 mr-3" />
<template #items>
<NeoDropdownItem
v-clipboard:copy="currentURL"
v-clipboard:copy="currentCollectionUrl"
@click.native="toast(`${$i18n.t('toast.urlCopy')}`)">
{{ $i18n.t('share.copyLink') }}
</NeoDropdownItem>
Expand All @@ -46,7 +46,7 @@
tag="div"
network="twitter"
:hashtags="hashtags"
:url="currentURL"
:url="currentCollectionUrl"
:title="sharingLabel"
twitter-user="KodaDot">
{{ $i18n.t('share.twitter') }}
Expand Down Expand Up @@ -87,7 +87,10 @@
<p class="card-header-title">{{ collection?.name }}</p>
</header>
<div class="card-content">
<QRCode :text="currentURL" color="#db2980" bg-color="#000" />
<QRCode
:text="currentCollectionUrl"
color="#db2980"
bg-color="#000" />
</div>
</div>
</b-modal>
Expand All @@ -102,9 +105,13 @@ import useIdentity from '@/components/identity/utils/useIdentity'

const route = useRoute()
const { accountId } = useAuth()
const { urlPrefix } = usePrefix()
const { $i18n, $buefy } = useNuxtApp()
const collectionId = computed(() => route.params.id)
const currentURL = computed(() => window.location.href)
const currentCollectionUrl = computed(
() =>
`${window.location.origin}/${urlPrefix.value}/collection/${collectionId.value}`
)
const { collection } = useCollectionMinimal({
collectionId: collectionId.value,
})
Expand Down

0 comments on commit f202dca

Please sign in to comment.