stakwork / sphinx-tribes-frontend

Frontend for sphinx tribes and bounties. The bounty platform that pays out in bitcoin. Sign up with Sphinx Chat, complete a bounty, and earn bitcoin! Go to our website for available bounties.
https://community.sphinx.chat/bounties
12 stars 42 forks source link

Fixed: Clear Search Box on People Page When Clicking Back Arrow Button #370

Closed aliraza556 closed 6 months ago

aliraza556 commented 6 months ago

Problem:

The search box on the People page retains its text even after the user clicks the back arrow button. This behavior is inconsistent with expected UI patterns where a back navigation should reset page state.

Expected Behavior:

After clicking the back arrow button on the People page, the search box should be cleared, and the page should return to its normal state as if freshly navigated to.

Issue ticket number and link:

Solution:

The solution involved ensuring that the search text state is reset to an empty string when the back button's onClick event handler is triggered. This was achieved by modifying the goBack function within the PeopleList component to call setSearchText('').

Changes:

Evidence:

Please see the attached video as evidence. https://www.loom.com/share/fb4bb0f3c72b4875be015ea21030ff4d

Testing:

Browser Compatibility:

Checklist before requesting a review