diff --git a/src/features/App/AuthenticatedApp.tsx b/src/features/App/AuthenticatedApp.tsx index ed54ffdf..4cce2e8d 100644 --- a/src/features/App/AuthenticatedApp.tsx +++ b/src/features/App/AuthenticatedApp.tsx @@ -3,7 +3,6 @@ import { Route, Redirect, Switch, - useRouteMatch, } from 'react-router-dom' import { indexLexics } from 'config/lexics/indexLexics' @@ -22,19 +21,15 @@ import { Header } from 'features/Header' import { MainWrapper } from 'features/MainWrapper' import { HeaderFiltersStore, - SportTypeFilter, - TournamentFilter, } from 'features/HeaderFilters' import { UserFavorites } from 'features/UserFavorites' import { UserFavoritesStore } from 'features/UserFavorites/store' import { useMediaQuery } from 'features/MediaQuery' import { HeaderMobile } from 'features/HeaderMobile' -import { BottomMenuWrapper } from 'features/HeaderMobile/styled' export const AuthenticatedApp = () => { useLexicsConfig(indexLexics) const isMobile = useMediaQuery({ query: devices.tablet }) - const isMatch = useRouteMatch(`/:sportName${PAGES.match}/:pageId`)?.isExact return ( @@ -83,16 +78,6 @@ export const AuthenticatedApp = () => { - { - isMobile && !isMatch - ? ( - - - - - ) - : null - } diff --git a/src/features/Header/index.tsx b/src/features/Header/index.tsx index 5c0df08d..27bc4943 100644 --- a/src/features/Header/index.tsx +++ b/src/features/Header/index.tsx @@ -1,5 +1,5 @@ import React, { Fragment } from 'react' -import { useRouteMatch } from 'react-router-dom' +import { Route, Switch } from 'react-router-dom' import { Menu } from 'features/Menu' import { Search } from 'features/Search' @@ -22,41 +22,41 @@ import { MenuWrapper, } from './styled' -export const Header = () => { - const isOnHome = useRouteMatch(PAGES.home)?.isExact - const isMatch = useRouteMatch(`/:sportName${PAGES.match}/:pageId`)?.isExact - return ( - - - - {!isOnHome && } - - {isMatch - ? ( +export const Header = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - ) - : ( - - - - - - - - - - - - - - {isOnHome && ( - - - - - )} - - )} - - ) -} + + + + +) diff --git a/src/features/HeaderMobile/index.tsx b/src/features/HeaderMobile/index.tsx index 7d80391f..9b8e191b 100644 --- a/src/features/HeaderMobile/index.tsx +++ b/src/features/HeaderMobile/index.tsx @@ -1,5 +1,5 @@ -import React, { Fragment } from 'react' -import { useRouteMatch } from 'react-router-dom' +import React from 'react' +import { Route, Switch } from 'react-router-dom' import { ToggleScore } from 'features/ToggleScore' import { Logo } from 'features/Logo' @@ -14,40 +14,43 @@ import { PAGES } from 'config' import { HeaderMobileWrapper, HeaderMobileTop, + HeaderMobileOnlyTop, HeaderMobileMidle, HeaderMobileBottom, HeaderIconsWrapper, IconFavWrapper, } from './styled' -export const HeaderMobile = () => { - const isMatch = useRouteMatch(`/:sportName${PAGES.match}/:pageId`)?.isExact +export const HeaderMobile = () => ( + + + + + + + + + + + + + + + + + + + + - return ( - - { - isMatch - ? null - : ( - - - - - - - - - - - - - - - - - - ) - } - - ) -} + + + + + + + + + + +) diff --git a/src/features/HeaderMobile/styled.tsx b/src/features/HeaderMobile/styled.tsx index 36bda32f..58cc11fd 100644 --- a/src/features/HeaderMobile/styled.tsx +++ b/src/features/HeaderMobile/styled.tsx @@ -16,6 +16,10 @@ export const HeaderMobileTop = styled.div` justify-content: space-between; padding: 12px 18px; ` +export const HeaderMobileOnlyTop = styled(HeaderMobileTop)` + margin-bottom: 25px; +` + export const HeaderMobileMidle = styled.div` width: 100%; height: 44px;