Currently, the Anchor Menu on the degree pages renders by default with no items. In this state, there is a bug where if you scroll down the page, then scroll back up the page, the menu will then disappear completely.
This PR adds a check to the OnThisPageAnchorMenu component to see if all values from the anchorMenu prop are false. If true, the component returns null.
This really may not be the best place to put this logic, or returning null for a component might just be a terrible idea. The end goal is to prevent the component from rendering at all if all the initial anchorMenu values are false. Please suggest changes as needed.
Description
Currently, the Anchor Menu on the degree pages renders by default with no items. In this state, there is a bug where if you scroll down the page, then scroll back up the page, the menu will then disappear completely.
This PR adds a check to the
OnThisPageAnchorMenu
component to see if all values from theanchorMenu
prop are false. If true, the component returnsnull
.This really may not be the best place to put this logic, or returning null for a component might just be a terrible idea. The end goal is to prevent the component from rendering at all if all the initial
anchorMenu
values are false. Please suggest changes as needed.Links
Checklist
yarn install
&yarn build
Browsers