Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: minted count #10903

Merged
merged 40 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
603f13b
refactor: unused drops component
preschian Aug 8, 2024
a7d9a7d
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 8, 2024
be72ec1
feat(drops): add DropItem component and refactor drops display logic
preschian Aug 8, 2024
3893023
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 12, 2024
c815af3
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 26, 2024
0f10165
refactor(drops): consolidate route availability check in parent compo…
preschian Aug 26, 2024
8f80106
fix(drops): handle null dropPrefix and ensure reactive chain properties
preschian Aug 26, 2024
746febf
fix(onchain): handle errors in readContract function calls
preschian Aug 26, 2024
14dbc57
refactor(drops): centralize drop attribute fetching logic and simplif…
preschian Aug 26, 2024
bcc6e72
refactor(drops): integrate useQuery for fetching drops
preschian Aug 26, 2024
ebddd3d
feat(drops): integrate chain-specific logic for drop attributes
preschian Aug 26, 2024
e92f5b3
refactor(carousel): streamline query parameters management in Carouse…
preschian Aug 26, 2024
ea3bb8d
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 26, 2024
a5ef0fd
fix(onchain): handle collection fetch error gracefully
preschian Aug 26, 2024
56e3737
refactor(drops): unify attribute fetching by removing isEvm dependency
preschian Aug 26, 2024
db07246
refactor(drops): streamline drop item formatting and attributes handling
preschian Aug 26, 2024
319d1f2
feat(carousel): add permission-based visibility to drops
preschian Aug 26, 2024
0948a31
feat(minted): track and sort minted drops in store
preschian Aug 26, 2024
b47c9c6
feat(drops): enable dynamic grid for drop items and cards
preschian Aug 27, 2024
f76bee9
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 27, 2024
be3a066
chore(cleanup): remove obsolete onchain utility files and ogi service
preschian Aug 27, 2024
2277228
feat(api): use environment-specific base URLs for API requests
preschian Aug 27, 2024
c785a2e
refactor(drops): consolidate Drop interface and move logic from useDr…
preschian Aug 28, 2024
2983180
refactor(drop): replace formattedDropItem with direct drop reference …
preschian Aug 28, 2024
e62b741
fix(collection): remove unnecessary location verification logic in Ph…
preschian Aug 28, 2024
82b556b
feat(oda): integrate ODA collection owners fetching function
preschian Aug 28, 2024
59f9ca1
docs(drops): add comments to clarify code sections and note potential…
preschian Aug 29, 2024
8a2b702
fix(api): correct endpoint URL in fetchOdaCollectionOwners function
preschian Aug 29, 2024
94e59e6
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 29, 2024
fb954b7
Merge branch 'main' into refactor--unused-drops-component
preschian Sep 4, 2024
22daf1f
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Sep 7, 2024
e6268e0
fix(drops): remove null check for dropPrefix in BasicDropCard component
preschian Sep 9, 2024
1ed352c
fix(collection): correct import path for fetchOdaCollectionOwners
preschian Sep 9, 2024
aca7010
refactor(drops): simplify conditional rendering logic in DropItem.vue
preschian Sep 9, 2024
577a29f
refactor(carousel): replace useDrops with useQuery for fetching drops…
preschian Sep 9, 2024
17c355f
feat(ui): display toast message after successful minting
preschian Sep 9, 2024
b889d7a
refactor(oda): remove unused QueryClient import
preschian Sep 9, 2024
61250dd
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Sep 10, 2024
7b0d692
fix(drops): adjust sorting based on chain type
preschian Sep 10, 2024
8f1ce5e
Merge branch 'main' into refactor--unused-drops-component
vikiival Sep 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions components/carousel/CarouselTypeDrops.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,7 @@

<script lang="ts" setup>
import { useDrops } from '@/components/drops/useDrops'

let queries = {
limit: 14,
active: [true],
chain: ['ahp', 'base'],
}

const { urlPrefix } = usePrefix()

if (!isProduction && urlPrefix.value === 'ahk') {
queries = {
...queries,
chain: ['ahk'],
}
}
import { dropsVisible } from '@/utils/config/permission.config'

const container = ref()
const { cols, isReady: isDynamicGridReady } = useDynamicGrid({
Expand All @@ -55,6 +41,12 @@ const skeletonCount = computed(() =>
Number.isInteger(perView.value) ? perView.value : Math.ceil(perView.value),
)

const { drops, loaded: isReady } = useDrops(queries, { filterOutMinted: true })
const { urlPrefix } = usePrefix()
const { drops, loaded: isReady } = useDrops({
limit: 14,
active: [true],
chain: dropsVisible(urlPrefix.value) ? [urlPrefix.value] : ['base', 'ahp'],
}, { filterOutMinted: true })

const dropsAlias = computed(() => drops.value.map(drop => drop.alias))
</script>
41 changes: 11 additions & 30 deletions components/collection/drop/GenerativeLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

<CollectionDropPhase
class="mt-28 md:mt-7"
:drop-status="formattedDropItem?.status"
:drop-start-time="formattedDropItem?.dropStartTime"
:drop-status="drop?.status"
:drop-start-time="drop?.dropStartTime"
/>

<CollectionUnlockableTag :collection-id="drop?.collection" />
Expand Down Expand Up @@ -89,16 +89,9 @@

<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import type {
Drop } from '@/components/drops/useDrops'
import {
getFormattedDropItem,
} from '@/components/drops/useDrops'
import { useCollectionActivity } from '@/composables/collectionActivity/useCollectionActivity'
import { useCollectionMinimal } from '@/components/collection/utils/useCollectionDetails'
import useCursorDropEvents from '@/composables/party/useCursorDropEvents'
import { DropEventType } from '@/composables/party/types'
import type { DropItem } from '@/params/types'
import { fetchOdaCollectionOwners } from '~/services/oda'

const mdBreakpoint = 768

Expand All @@ -109,32 +102,20 @@ const { previewItem, userMintsCount } = storeToRefs(useDropStore())
const { width } = useWindowSize()

const { emitEvent, completeLastEvent } = useCursorDropEvents()
const { collection: collectionInfo } = useCollectionMinimal({
collectionId: computed(() => drop.value?.collection ?? ''),
})

const divider = ref()

const address = computed(() => drop.value?.creator)

const { owners } = useCollectionActivity({
collectionId: computed(() => drop.value?.collection),
const owners = ref()
const ownerAddresses = computed(() => Object.keys(owners.value?.owners || {}))
watchEffect(async () => {
if (!drop.value?.collection) {
return
}

owners.value = await fetchOdaCollectionOwners(drop.value.chain, drop.value.collection)
})
const ownerAddresses = computed(() => Object.keys(owners.value || {}))

const formattedDropItem = ref<Drop>()
watch(
[collectionInfo],
async () => {
if (collectionInfo.value) {
formattedDropItem.value = await getFormattedDropItem(
collectionInfo.value,
drop.value as DropItem,
)
}
},
{ immediate: true },
)

const handleNftGeneration = (preview: GenerativePreviewItem) => {
emitEvent(DropEventType.DROP_GENERATING)
Expand Down
15 changes: 0 additions & 15 deletions components/collection/drop/Phase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,6 @@
:title="`Drop: ${drop.name}`"
:drop-start-time="dropStartTime"
/>

<!-- if there is location on the campaign -->
<CollectionDropRequirementItem
v-if="drop?.location"
:fulfilled="Boolean(drop?.userAccess)"
>
<p class="capitalize">
Location Verification: You are
<span
v-if="!Boolean(drop?.userAccess)"
class="font-bold"
>not</span> in
<span class="font-bold">{{ drop?.location }}</span>
</p>
</CollectionDropRequirementItem>
</div>
</template>

Expand Down
86 changes: 0 additions & 86 deletions components/collection/unlockable/UnlockableHeroButtons.vue

This file was deleted.

This file was deleted.

44 changes: 0 additions & 44 deletions components/collection/unlockable/UnlockableLandingTag.vue

This file was deleted.

Loading
Loading