Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into quick-fixes-drop
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiival committed Dec 15, 2023
2 parents 191a783 + 587085b commit dc706ac
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions components/collection/drop/HolderOfGenerative.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
<UnlockableSlider :value="mintedCount / maxCount" />
</div>
<div class="my-5">
<div class="is-flex is-justify-content-space-between">
<!-- <div v-if="hasUserMinted" class="is-flex is-align-items-center">
<div
v-if="hasUserMinted"
class="is-flex is-justify-content-flex-end is-align-items-center">
<div class="is-flex is-align-items-center">
<div class="mr-2">
{{ $t('mint.unlockable.nftAlreadyMinted') }}
</div>
Expand All @@ -50,8 +52,10 @@
class="my-2 mint-button"
:tag="NuxtLink"
:label="$t('mint.unlockable.seeYourNft')"
:to="`/${urlPrefix}/u/${accountId}`" />
</div> -->
:to="`/${urlPrefix}/gallery/${hasUserMinted}`" />
</div>
</div>
<div v-else class="is-flex is-justify-content-space-between">
<div class="mt-4">
<CollectionDropHolderOfCollection
:is-holder="isHolderOfTargetCollection"
Expand All @@ -70,6 +74,7 @@
class="minimum-funds-description" />
</div>
</div>

<div class="is-flex">
<NeoButton
ref="root"
Expand Down Expand Up @@ -135,6 +140,8 @@ import Loader from '@/components/shared/Loader.vue'
const holderOfCollectionId = '50' // ChaosFlakes | todo: mock for testing, should be fetched from backend
const NuxtLink = resolveComponent('NuxtLink')
const props = defineProps({
drop: {
type: Object,
Expand Down Expand Up @@ -163,13 +170,14 @@ const disabledByBackend = computed(() => props.drop?.disabled)
const defaultImage = computed(() => props.drop?.image)
const defaultName = computed(() => props.drop?.name)
const defaultMax = computed(() => props.drop?.max || 255)
const { mintedDropCount, fetchDropStatus } = useDropStatus(props.drop.alias)
const { currentAccountMintedToken, mintedDropCount, fetchDropStatus } =
useDropStatus(props.drop.alias)
const instance = getCurrentInstance()
const mintNftSN = ref('0')
const { doAfterLogin } = useDoAfterlogin(instance)
const { $i18n, $consola } = useNuxtApp()
const root = ref()
const { urlPrefix } = usePrefix()
const { toast } = useToast()
const { accountId, isLogIn } = useAuth()
Expand Down Expand Up @@ -246,11 +254,11 @@ const maxCount = computed(
() => collectionData.value?.collectionEntity?.max || defaultMax.value,
)
// const hasUserMinted = computed(() =>
// currentAccountMintedToken.value
// ? `${collectionId.value}-${currentAccountMintedToken.value.id}`
// : mintedNft.value?.id,
// )
const hasUserMinted = computed(() =>
currentAccountMintedToken.value
? `${collectionId.value}-${currentAccountMintedToken.value.id}`
: mintedNft.value?.id,
)
const mintedCount = computed(() =>
Math.min(mintedDropCount.value, maxCount.value),
Expand Down

0 comments on commit dc706ac

Please sign in to comment.