You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For our SSW.Website, JSON data generated by TinaCMS is added as a param (i.e menuBarItems) . However, the current implementation calls ssw.com.au/api/get-megamenu regardless of the parameters, leading to overwritten props data.
To Reproduce
Steps to reproduce the behavior:
Install this as a library
Use MegaMenuLayout and pass the prop called menuBarItems
Expected Behavior
It should not call the API if the menuBarItems has data
Tasks
Avoid the API call if the menuBarItems is already provided
Update REAMDE for NextJS project as it may not run directly due to Server Side Rendering
Add ClassName props as an optional prop to add customizable anchor links styling
Ideally, we should export types such as iconMap and other types used for the website's TinaCMS schema, rather than keeping them within the website itself.
Thanks!
The text was updated successfully, but these errors were encountered:
This would be good to sort out. The side effect of refreshing the megamenu data is that it overwrites local and PR slot with the production menu.json making it confusing and poor DX when updating content on MegaMenu.
The suggestion here to conditionally refresh the data only if there is no menuBarItems passed seems reasonable.
Describe the Bug
For our SSW.Website, JSON data generated by TinaCMS is added as a param (i.e
menuBarItems
) . However, the current implementation calls ssw.com.au/api/get-megamenu regardless of the parameters, leading to overwritten props data.To Reproduce
Steps to reproduce the behavior:
MegaMenuLayout
and pass the prop calledmenuBarItems
Expected Behavior
It should not call the API if the
menuBarItems
has dataTasks
menuBarItems
is already providedIdeally, we should export types such as
iconMap
and other types used for the website's TinaCMS schema, rather than keeping them within the website itself.Thanks!
The text was updated successfully, but these errors were encountered: