Skip to content

Commit

Permalink
Merge pull request #2725 from Jarsen136/issue-2723
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwao committed Apr 3, 2022
2 parents 0be5486 + 4dca212 commit 76d3a47
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions components/rmrk/Profile/ProfileDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ import nftListSold from '@/queries/nftListSold.graphql'
import firstNftByIssuer from '@/queries/firstNftByIssuer.graphql'
import PrefixMixin from '@/utils/mixins/prefixMixin'
import collectionListByAccount from '@/queries/rmrk/subsquid/collectionListByAccount.graphql'
import { Debounce } from 'vue-debounce-decorator'
const components = {
GalleryCardList: () =>
Expand Down Expand Up @@ -340,7 +341,11 @@ export default class Profile extends mixins(PrefixMixin) {
// this.isLoading = false;
}
@Debounce(100)
private async fetchCollectionList() {
if (!this.id) {
this.checkId()
}
const result = await this.$apollo.query({
query: collectionListByAccount,
client: this.urlPrefix === 'rmrk' ? 'subsquid' : this.urlPrefix,
Expand Down Expand Up @@ -395,8 +400,10 @@ export default class Profile extends mixins(PrefixMixin) {
}
}
@Watch('currentCollectionPage', { immediate: true })
private handleCurrentPageChange() {
this.fetchCollectionList()
private handleCurrentPageChange(page: number) {
if (page) {
this.fetchCollectionList()
}
}
}
</script>
Expand Down

0 comments on commit 76d3a47

Please sign in to comment.