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: hide sidebar on new-shop page #327

Conversation

loan-laux
Copy link
Contributor

Signed-off-by: Loan Laux [email protected]

Impact: major
Type: bugfix

Issue

The sidebar is shown even when on the /new-shop page, which shouldn't be the case. When clicking on a sidebar link from the /new-shop page, the basic routing thingy that I implemented will think that the current shop ID is new-shop, resulting in users landing on pages like /new-shop/products, which obviously isn't desired.

Solution

Make useCurrentShopId return no shop ID when the new-shop page is shown. This way, the sidebar will be hidden, and any other part using useCurrentShopId will know that there's currently no shop ID selected.

Breaking changes

None.

Testing

  1. Open the /new-shop page.
  2. Check that the sidebar links are hidden.
  3. Select a shop.
  4. Check that the sidebar links are shown.

@rosshadden rosshadden merged commit ad0bcf2 into reactioncommerce:trunk Oct 5, 2020
@mikemurray mikemurray mentioned this pull request Dec 4, 2020
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.

2 participants