diff --git a/components/collection/activity/ownerInsightsTabs/HolderTab.vue b/components/collection/activity/ownerInsightsTabs/HolderTab.vue index f3e92a296e..0aa532cc2f 100644 --- a/components/collection/activity/ownerInsightsTabs/HolderTab.vue +++ b/components/collection/activity/ownerInsightsTabs/HolderTab.vue @@ -91,6 +91,10 @@ const toggleNFTDetails = (holderId: string) => { const target = ref(null) const offset = ref(4) +onMounted(() => { + console.log(props.owners) +}) + const holders = computed(() => Object.entries(props.owners || {}).sort( // sort by nft count: highest first diff --git a/composables/collectionActivity/useCollectionActivity.ts b/composables/collectionActivity/useCollectionActivity.ts index b57fef6df5..5e68833a09 100644 --- a/composables/collectionActivity/useCollectionActivity.ts +++ b/composables/collectionActivity/useCollectionActivity.ts @@ -18,10 +18,12 @@ export const useCollectionActivity = ({ collectionId }) => { }, }) + console.log(data) + watch(data, (result) => { - if (result.value?.collection) { + if (result) { // flat events for chart - const interactions: InteractionWithNFT[] = result.value.collection.nfts + const interactions: InteractionWithNFT[] = result.collection.nfts .map((nft) => nft.events.map((e) => ({ ...e, @@ -33,11 +35,11 @@ export const useCollectionActivity = ({ collectionId }) => { events.value = interactions if (urlPrefix.value === 'bsx') { - offers.value = getOffers(result.value.collection.nfts) + offers.value = getOffers(result.collection.nfts) } // not to repeat ref names - const ownersTemp = getOwners(result.value.collection.nfts) + const ownersTemp = getOwners(result.collection.nfts) const flippersTemp = getFlippers(interactions) const flipperdIds = Object.keys(flippersTemp)