You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/src/features/HeaderMobile/index.tsx

32 lines
817 B

import { Link, useRouteMatch } from 'react-router-dom'
import { PAGES } from 'config'
import { ScoreSwitch, AvailableMatchesSwitch } from 'features/MatchSwitches'
import { Logo } from 'features/Logo'
import { Menu } from 'features/Menu'
import { Search } from 'features/Search'
import {
HeaderMobileWrapper,
HeaderIconsWrapper,
IconFavWrapper,
} from './styled'
export const HeaderMobile = () => {
const isMatchPage = useRouteMatch(`/:sportName${PAGES.match}`)
return (
<HeaderMobileWrapper>
<ScoreSwitch />
{!isMatchPage && <AvailableMatchesSwitch />}
<Link to={PAGES.home}>
<Logo width={52} height={12} />
</Link>
<HeaderIconsWrapper>
<IconFavWrapper />
<Search />
<Menu />
</HeaderIconsWrapper>
</HeaderMobileWrapper>
)
}