Skip to content

fix(web): products selector redirection#1333

Closed
dgdavid wants to merge 2 commits intomasterfrom
fix-product-redirection
Closed

fix(web): products selector redirection#1333
dgdavid wants to merge 2 commits intomasterfrom
fix-product-redirection

Conversation

@dgdavid
Copy link
Copy Markdown
Contributor

@dgdavid dgdavid commented Jun 13, 2024

Problem

We've found an extra, not needed, even blocking redirection to the product selector once the product is configured.

We think this happens because the condition, which wrongly leaves in the OverviewPage component for historical reasons (it was the main component in the previous UI / routes schema), is triggered before the component has the chance to run its useEffects.

Solution

Place the condition in App.jsx, but inside the internal Content component AFTER the products list has been loaded as a way to ensure that useEffects has been already triggered. A hotfix, indeed.

Testing

To be tested with a live ISO

Follow up

Refactor the App.jsx component to drop its "router" behaviour and rely more, when possible, in React Router and route loaders or whatever other mechanism that feels better than current one.

@dgdavid dgdavid changed the title fix(web): avoid not needed products redirection fix(web): products selector redirection Jun 13, 2024
@dgdavid
Copy link
Copy Markdown
Contributor Author

dgdavid commented Jun 14, 2024

#1334 fixes the problem

@dgdavid dgdavid closed this Jun 14, 2024
@dgdavid dgdavid deleted the fix-product-redirection branch July 12, 2024 10:52
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.

1 participant