diff --git a/components/collection/drop/GenerativePreview.vue b/components/collection/drop/GenerativePreview.vue index 50002cab23..07cbaf5b2a 100644 --- a/components/collection/drop/GenerativePreview.vue +++ b/components/collection/drop/GenerativePreview.vue @@ -60,7 +60,7 @@ {{ mintedPercent }}% ~
{{ drop.minted }} @@ -113,7 +113,7 @@ import useGenerativeIframeData from '@/composables/drop/useGenerativeIframeData' const { accountId } = useAuth() const { chainSymbol, decimals } = useChain() const dropStore = useDropStore() -const { userMintsCount, drop } = storeToRefs(dropStore) +const { userMintsCount, drop, getIsLoadingMaxCount } = storeToRefs(dropStore) const { imageDataPayload, imageDataLoaded } = useGenerativeIframeData() const { formatted: formattedPrice } = useAmount( computed(() => drop.value.price), diff --git a/components/collection/drop/MintButton.vue b/components/collection/drop/MintButton.vue index 17aabdf4bf..88596d455a 100644 --- a/components/collection/drop/MintButton.vue +++ b/components/collection/drop/MintButton.vue @@ -41,7 +41,7 @@ const dropStore = useDropStore() const { hasCurrentChainBalance } = useMultipleBalance() const now = useNow() const { mintCountAvailable } = useGenerativeDropMint() -const { amountToMint, previewItem, userMintsCount, drop } = storeToRefs(dropStore) +const { amountToMint, previewItem, userMintsCount, drop, getIsLoadingMaxCount } = storeToRefs(dropStore) const { hasMinimumFunds } = useDropMinimumFunds() const { holderOfCollection } = useHolderOfCollection() @@ -149,7 +149,8 @@ const loading = computed( () => dropStore.isCapturingImage || dropStore.walletConnecting - || dropStore.loading, + || dropStore.loading + || getIsLoadingMaxCount.value, ) const showHolderOfCollection = computed(() => diff --git a/stores/drop.ts b/stores/drop.ts index 97f8ab4ebc..51baabdc37 100644 --- a/stores/drop.ts +++ b/stores/drop.ts @@ -55,7 +55,9 @@ export const useDropStore = defineStore('drop', { mintedNFTs: [], } }, - getters: {}, + getters: { + getIsLoadingMaxCount: state => !(state.drop.minted >= 0 && Boolean(state.drop.max)), + }, actions: { setLoading(payload: boolean) { this.loading = payload