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(bounty-twice): Fixed Duplicate PopUp Issue When Viewing Bounty From Profile #1269

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

aliraza556
Copy link
Contributor

Problem:

When viewing a bounty in the profile (both under Created and Assigned sections), the bounty detail page is incorrectly displayed twice. This appears to be a result of the default behavior of the anchor tags in the Panel components, causing duplicate navigation actions.

Expected Behavior:

The expected behavior is that when a user clicks on a bounty in their profile, the bounty detail page should appear only once, providing a clean and user-friendly experience.

Issue ticket number and link:

Solution:

The issue was resolved by preventing the default action of the anchor tags in the Panel components within both UserTicketView.tsx and Wanted.tsx files. This was achieved by adding e.preventDefault() in the onClick event handlers, thus stopping the default navigation and allowing for the custom routing logic to execute correctly.

Changes:

  • In UserTicketView.tsx, modified the onPanelClick function to include e.preventDefault() to stop the anchor tag from triggering a page load.
  • In Wanted.tsx, added e.preventDefault() in the onClick handler of the Panel component to prevent default navigation and instead use the history.push() method for navigation.

Evidence:

Please see the attached video as evidence.

Testing:

  • Clicked on various bounties in both Created and Assigned sections of the profile to ensure that the detail page opens correctly.
  • Verified that the issue of the detail page appearing twice is resolved across different browsers and screen sizes.
  • Verified that no other functionalities are impacted by this change.

Notes:

Please review the changes and merge this PR if everything is in order.

@ecurrencyhodler
Copy link
Contributor

Thanks for posting a demo. The video looks good. Looks like prettier is failing. Can you take another look?

@aliraza556
Copy link
Contributor Author

Hi @ecurrencyhodler
Thank you for reviewing the demo. I'm glad to hear that the video looks good.

@aliraza556
Copy link
Contributor Author

I appreciate your patience. I've addressed the issue with Prettier, and the problem has been resolved. I've tested it thoroughly, and everything seems to be working as expected now.

@ecurrencyhodler
Copy link
Contributor

Awesome. Let's get a code review.

@aliraza556
Copy link
Contributor Author

Hi @ecurrencyhodler,
Please review the PR code.

@elraphty elraphty merged commit b97bc38 into stakwork:master Jan 9, 2024
5 checks passed
@ecurrencyhodler
Copy link
Contributor

Tested on staging and it's smooth. GJ. Paid!

@aliraza556 aliraza556 deleted the viewing-bounty-twice branch January 17, 2024 14:12
elraphty added a commit that referenced this pull request Jan 26, 2024
fix(bounty-twice): Fixed Duplicate PopUp Issue When Viewing Bounty From Profile
elraphty added a commit that referenced this pull request Jan 26, 2024
fix(bounty-twice): Fixed Duplicate PopUp Issue When Viewing Bounty From Profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants