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

GH-2216: Disable setup sidebar link on fourth page of setup #631

Merged
merged 8 commits into from Nov 20, 2020

Refactor code

  • Loading branch information
benstrumeyer committed Nov 12, 2020
commit ff6770586a43b55c1f29bad71bfb3d9635161fde
@@ -29,10 +29,11 @@ const { GHOSTERY_BASE_URL } = globals;
* @return {JSX} JSX of the Navigation Menu Item
*/
function _renderMenuItem(item, disableNav) {
// Disable the link that leads to a blank screen on custom setup page 4 in ticket GH-2216
const isSetupPageFour = window.location.href.indexOf('setup/4') > -1;
// Disable the sidebar link that leads to a blank screen on custom setup page 4 (GH-2216)
const shouldDisableSetupLink = window.location.href.indexOf('setup/4') > -1 && (item.href.substring(1) === 'setup');

const linkClassNames = ClassNames('flex-container align-middle', {
disabled: disableNav || (item.href.substring(1) === 'setup' && isSetupPageFour)
disabled: disableNav || shouldDisableSetupLink
});

return (
ProTip! Use n and p to navigate between commits in a pull request.