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:
- 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
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!
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:
MegaMenuLayoutand pass the prop calledmenuBarItemsExpected Behavior
It should not call the API if the
menuBarItemshas dataTasks
menuBarItemsis already providedIdeally, we should export types such as
iconMapand other types used for the website's TinaCMS schema, rather than keeping them within the website itself.Thanks!