fix(ssr): Only render LargeNav on SSR
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user