fix(ssr): Only render LargeNav on SSR

This commit is contained in:
Stuart Taylor
2018-03-13 20:34:42 +00:00
parent 61d76220c7
commit c80e98a9a4
2 changed files with 8 additions and 6 deletions

View File

@ -10,8 +10,9 @@ function MediumNav({ clickOnLogo, clickOnMap, shouldShowMapButton, panes }) {
return (
<Media
query={{ maxWidth: 955, minWidth: 751 }}
render={
() => (
>
{
matches => matches && typeof window !== 'undefined' && (
<div>
<Row>
<Navbar.Header className='medium-nav'>
@ -42,7 +43,7 @@ function MediumNav({ clickOnLogo, clickOnMap, shouldShowMapButton, panes }) {
</div>
)
}
/>
</Media>
);
}

View File

@ -10,8 +10,9 @@ function SmallNav({ clickOnLogo, clickOnMap, shouldShowMapButton, panes }) {
return (
<Media
query='(max-width: 750px)'
render={
() => (
>
{
matches => matches && typeof window !== 'undefined' && (
<div>
<Row>
<Navbar.Header className='small-nav'>
@ -43,7 +44,7 @@ function SmallNav({ clickOnLogo, clickOnMap, shouldShowMapButton, panes }) {
</div>
)
}
/>
</Media>
);
}