|
|
|
@ -1,7 +1,7 @@ |
|
|
|
import { useRecoilValue } from 'recoil' |
|
|
|
import { useRecoilValue } from 'recoil' |
|
|
|
|
|
|
|
|
|
|
|
import { isIOS } from 'config/userAgent' |
|
|
|
import { isAndroid, isIOS } from 'config/userAgent' |
|
|
|
import { isLffClient } from 'config/clients' |
|
|
|
import { client, isLffClient } from 'config/clients' |
|
|
|
|
|
|
|
|
|
|
|
import { HeaderMenu } from 'features/HeaderMenu' |
|
|
|
import { HeaderMenu } from 'features/HeaderMenu' |
|
|
|
import { DateFilter } from 'features/HeaderFilters' |
|
|
|
import { DateFilter } from 'features/HeaderFilters' |
|
|
|
@ -10,6 +10,8 @@ import { SportsFilter } from 'features/SportsFilter' |
|
|
|
import { isSportFilterShownAtom } from 'features/HomePage/Atoms/HomePageAtoms' |
|
|
|
import { isSportFilterShownAtom } from 'features/HomePage/Atoms/HomePageAtoms' |
|
|
|
import { SmartBanner } from 'components/SmartBanner' |
|
|
|
import { SmartBanner } from 'components/SmartBanner' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { UserInfo } from 'requests' |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
import { |
|
|
|
HeaderStyled, |
|
|
|
HeaderStyled, |
|
|
|
ScoreSwitchWrapper, |
|
|
|
ScoreSwitchWrapper, |
|
|
|
@ -19,16 +21,22 @@ import { |
|
|
|
type HeaderBannerProps = { |
|
|
|
type HeaderBannerProps = { |
|
|
|
isOpenDownload: boolean, |
|
|
|
isOpenDownload: boolean, |
|
|
|
setIsOpenDownload: (open: boolean) => void, |
|
|
|
setIsOpenDownload: (open: boolean) => void, |
|
|
|
|
|
|
|
userInfo?: UserInfo, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const HeaderMobile = ({ isOpenDownload, setIsOpenDownload }: HeaderBannerProps) => { |
|
|
|
export const HeaderMobile = ({ |
|
|
|
|
|
|
|
isOpenDownload, |
|
|
|
|
|
|
|
setIsOpenDownload, |
|
|
|
|
|
|
|
userInfo, |
|
|
|
|
|
|
|
}: HeaderBannerProps) => { |
|
|
|
const isSportFilterShown = useRecoilValue(isSportFilterShownAtom) |
|
|
|
const isSportFilterShown = useRecoilValue(isSportFilterShownAtom) |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
{ |
|
|
|
{ |
|
|
|
isOpenDownload |
|
|
|
isOpenDownload |
|
|
|
&& !isIOS |
|
|
|
&& (isAndroid || (isIOS && userInfo?.has_subscription)) |
|
|
|
|
|
|
|
&& client.showSmartBanner |
|
|
|
&& <SmartBanner setIsOpenDownload={setIsOpenDownload} /> |
|
|
|
&& <SmartBanner setIsOpenDownload={setIsOpenDownload} /> |
|
|
|
} |
|
|
|
} |
|
|
|
<HeaderStyled> |
|
|
|
<HeaderStyled> |
|
|
|
|