Verified Commit a16cfb08 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Prevent profile menu server-side rendering

parent 74714f7c
......@@ -5,6 +5,7 @@ import { makeStyles } from '@material-ui/core/styles'
import AppBar from '@material-ui/core/AppBar'
import Box from '@material-ui/core/Box'
import Collapse from '@material-ui/core/Collapse'
import NoSsr from '@material-ui/core/NoSsr'
import { useIntl } from 'gatsby-plugin-intl'
import HideOnScroll from '../general/hideOnScroll'
......@@ -133,10 +134,6 @@ const useStyles = makeStyles(theme => ({
},
profileMenu: {
gridArea: 'profile',
display: 'none',
},
profileMenuVisible: {
display: 'block',
},
languageSelector: {
gridArea: 'language-selector',
......@@ -197,13 +194,12 @@ const Header = ({ className }) => {
className={classes.mainMenu}
preventMobileMenuClosing={preventMobileMenuClosing}
/>
<ProfileMenu
className={[
isBrowser && classes.profileMenuVisible,
classes.profileMenu,
].join(' ')}
preventMobileMenuClosing={preventMobileMenuClosing}
/>
<NoSsr>
<ProfileMenu
className={classes.profileMenu}
preventMobileMenuClosing={preventMobileMenuClosing}
/>
</NoSsr>
<LanguageSelector className={classes.languageSelector} />
</React.Fragment>
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment