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: profile tabs not working properly sometimes #2725

Merged
merged 2 commits into from
Apr 3, 2022

Conversation

Jarsen136
Copy link
Contributor

Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.

PR type

  • Bugfix
  • Feature
  • Refactoring

What's new?

Before submitting Pull Request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality
  • I've posted a screenshot of demonstrated change in this PR

Optional

  • I've tested it at </rmrk/collection/26902bc2f7c20c546a-1FVG7>
  • I've tested PR on mobile and everything seems works
  • I found edge cases
  • I've written some unit tests 🧪

Had issue bounty label?

  • Fill up your KSM address: Payout

Community participation

Screenshot

  • My fix has changed something on UI; a screenshot is best to understand changes for others.

@netlify
Copy link

netlify bot commented Apr 1, 2022

Deploy Preview for koda-nuxt ready!

Name Link
🔨 Latest commit 4dca212
🔍 Latest deploy log https://app.netlify.com/sites/koda-nuxt/deploys/6246e6747e578a00089fc2e6
😎 Deploy Preview https://deploy-preview-2725--koda-nuxt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Jarsen136 Jarsen136 changed the title fix profile tabs fix: profile tabs not working properly sometimes Apr 1, 2022
@vikiival
Copy link
Member

vikiival commented Apr 1, 2022

Code looks oki

@vikiival
Copy link
Member

vikiival commented Apr 1, 2022

@XyloDrone said she wants to test it

@XyloDrone
Copy link

@Jarsen136
Copy link
Contributor Author

Jarsen136 commented Apr 1, 2022

Hmm, still having the same issue... Screenshot 2022-04-01 at 13 58 00 this is via https://deploy-preview-2725--koda-nuxt.netlify.app/rmrk/u/5EekGnpPfqHYg8jSq7kxaPUEeDnVhDMJbU62jNgT5iocuvsQ?tab=collected

It seem that this address have no any collected items and nfts. So the current display is normal.

What do you think 👀 cc @vikiival
operationName: "nftListCollected"
image

operationName: "firstNftByIssuer"
image

@XyloDrone
Copy link

oh, I actually have quite a few NFTs :D
Seems to be working on kodadot.xyz now tho: https://kodadot.xyz/rmrk/u/FAMw7AGJCJURnYtbpa1ULqEnp4jVtAV3qvn82xQZX27ezBB?tab=collected

@Jarsen136
Copy link
Contributor Author

oh, I actually have quite a few NFTs :D Seems to be working on kodadot.xyz now tho: https://kodadot.xyz/rmrk/u/FAMw7AGJCJURnYtbpa1ULqEnp4jVtAV3qvn82xQZX27ezBB?tab=collected

Oh, sorry. I will check it.

Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I'm missing something but could you explain why you use a debounce?
For me debounce & timeout are not good pratice

@Jarsen136
Copy link
Contributor Author

Jarsen136 commented Apr 2, 2022

Hmm, still having the same issue... Screenshot 2022-04-01 at 13 58 00 this is via https://deploy-preview-2725--koda-nuxt.netlify.app/rmrk/u/5EekGnpPfqHYg8jSq7kxaPUEeDnVhDMJbU62jNgT5iocuvsQ?tab=collected

It seem that this address have no any collected items and nfts. So the current display is normal.

oh, I actually have quite a few NFTs :D Seems to be working on kodadot.xyz now tho: https://kodadot.xyz/rmrk/u/FAMw7AGJCJURnYtbpa1ULqEnp4jVtAV3qvn82xQZX27ezBB?tab=collected

I found the reason. These two address are different. Though I have no idea why they have the same display name : )

5EekGnpPfqHYg8jSq7kxaPUEeDnVhDMJbU62jNgT5iocuvsQ -> have no nfts
FAMw7AGJCJURnYtbpa1ULqEnp4jVtAV3qvn82xQZX27ezBB -> have nfts

Actually, you may try to visit the below url to test if it works well. @XyloDrone
https://deploy-preview-2725--koda-nuxt.netlify.app/rmrk/u/FAMw7AGJCJURnYtbpa1ULqEnp4jVtAV3qvn82xQZX27ezBB?tab=collected

And it WFM
image

@Jarsen136
Copy link
Contributor Author

Sorry if I'm missing something but could you explain why you use a debounce? For me debounce & timeout are not good pratice

OK, I explain why I use it. The error in the issue causes by repeated network requests on page initialization.

invoke request from component mounted:
image

invoke request from pageChange:
image

The this.id is undefined when requesting from pageChange, so the response list may be [] sometimes. further resulted in an empty list of pages.

We need to set 'this.id' before request. Also prevent from double request by using debounce.

@XyloDrone
Copy link

Cool, it works now!

@Jarsen136 Jarsen136 requested a review from roiLeo April 2, 2022 10:33
@yangwao
Copy link
Member

yangwao commented Apr 3, 2022

pay 100 usd
let's test on main

@yangwao
Copy link
Member

yangwao commented Apr 3, 2022

😍 Perfect, I’ve sent the payout
💵 $100 @ 201.69 USD/KSM ~ 0.496 $KSM
🧗 Caiv9TbPz68q5dC8EcHu5xKYPRnremimGzqmEejDFNpWWLG
🔗 0x5dfec73cbc8b18b0491c409b5e0331331814ace1c14e09ba18b95357ea22709d

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Apr 3, 2022
@yangwao yangwao merged commit 76d3a47 into kodadot:main Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paid pull-request has been paid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

profile Tabs not working properly sometimes
5 participants