Created
April 7, 2021 18:38
-
-
Save meshulam/d4b928290662cabb7018af8be2e53ecb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function CategoryFlyout({ visible }) { | |
+ // Always render links in the DOM for bots, for SEO purposes | |
+ const renderWhenHidden = currentUser().isBot; | |
+ | |
+ if (!visible && !renderWhenHidden) { | |
+ return null; | |
+ } | |
+ | |
const classes = classNames( | |
'category-flyout', | |
{ 'category-flyout--visible': visible }, | |
); | |
return ( | |
<div className={classes} role="dialog" aria-hidden={!visible}> | |
{/* heading, links, image, etc */} | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment