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

Display active tab in URL on "My cooperations" and "My offers" pages #2630

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

YaroslavChuiko
Copy link
Contributor

@YaroslavChuiko YaroslavChuiko commented Oct 18, 2024

Description

This PR adds functionality to display the active tab in the URL on the "My Cooperations" and "My Offers" pages. Now, when users navigate between tabs, the URL updates reflect the selected tab, allowing for improved navigation and sharing specific tab views.

Changes Made

  • Updated routing logic to capture and display the active tab as a URL query parameter.
  • Moved tabs into new component TabFilterList to reuse it across different pages
  • Modified tab component behavior to sync with the URL, ensuring the correct tab is shown when visiting a URL with an active tab parameter.
  • Handling for default tab selection was added when no tab parameter was present.

Testing

  • Verified that switching tabs updates the URL correctly.
  • Confirmed that reloading the page with an active tab in the URL correctly displays the corresponding tab.

@YaroslavChuiko YaroslavChuiko added enhancement New feature or request Frontend part labels Oct 18, 2024
@YaroslavChuiko YaroslavChuiko self-assigned this Oct 18, 2024
@YaroslavChuiko YaroslavChuiko force-pushed the feature/2629/display-active-tab-in-url branch 2 times, most recently from 1756c5a to 5faab5d Compare October 23, 2024 08:49
src/pages/my-cooperations/MyCooperations.tsx Outdated Show resolved Hide resolved
src/pages/my-offers/MyOffers.tsx Show resolved Hide resolved
src/pages/my-offers/MyOffers.tsx Show resolved Hide resolved
@YaroslavChuiko YaroslavChuiko force-pushed the feature/2629/display-active-tab-in-url branch from 6e10521 to 402d2c7 Compare October 24, 2024 13:14
Copy link

@YaroslavChuiko YaroslavChuiko merged commit 2f4906a into develop Oct 28, 2024
9 checks passed
@YaroslavChuiko YaroslavChuiko deleted the feature/2629/display-active-tab-in-url branch October 28, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Frontend part
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(SP: 2) Display active tab in URL on "My cooperations" and "My offers" pages
4 participants