fix(client): set --header-height only if Header exists

This commit is contained in:
Valeriy
2019-09-01 03:40:49 +03:00
committed by Mrugesh Mohapatra
parent d161459109
commit 9ce4331e25
5 changed files with 19 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import SearchBar from '../search/searchBar/SearchBar';
import NavigationMenu from './components/NavMenu';
@@ -15,15 +16,20 @@ const propTypes = {
function Header(props) {
const { disableSettings } = props;
return (
<header>
<nav id='top-nav'>
<Link className='home-link' to='/'>
<NavLogo />
</Link>
<SearchBar />
<NavigationMenu disableSettings={disableSettings} />
</nav>
</header>
<>
<Helmet>
<style>{':root{--header-height: 38px}'}</style>
</Helmet>
<header>
<nav id='top-nav'>
<Link className='home-link' to='/'>
<NavLogo />
</Link>
<SearchBar />
<NavigationMenu disableSettings={disableSettings} />
</nav>
</header>
</>
);
}