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

🐛 Megamenu - Discards prefetched data on load #3357

Open
3 tasks
Calinator444 opened this issue Nov 27, 2024 · 0 comments
Open
3 tasks

🐛 Megamenu - Discards prefetched data on load #3357

Calinator444 opened this issue Nov 27, 2024 · 0 comments

Comments

@Calinator444
Copy link
Member

Calinator444 commented Nov 27, 2024

CC: @wicksipedia

Description:

There's a useEffect hook that runs in the megamenu that gets used to update the links. The issue is that this is that this hook runs immediately when the component mounts (because of the empty dependency array), and it's asynchronous so it discards the prefetched data. It also uses the full API URL for the SSW mega menu endpoint, making it impossible to preview changes to the MegaMenu in staging.
Image

Todo:

  • Remove the megamenu data fetch from the megamenu repo
  • Communicate with the SSW Rules team to check whether the megamenu props on Rules are passed in statically
  • Communicate with the SSW People team to check whether the megamenu props on Rules are passed in statically
@github-project-automation github-project-automation bot moved this to 🤷‍♂️ Needs Triage in SSW.Website Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🤷‍♂️ Needs Triage
Development

No branches or pull requests

1 participant