|
|
|
|
@ -3,6 +3,7 @@ import { Fragment } from 'react' |
|
|
|
|
import { SportIcon } from 'components/SportIcon/SportIcon' |
|
|
|
|
|
|
|
|
|
import { Name } from 'features/Name' |
|
|
|
|
import { T9n } from 'features/T9n' |
|
|
|
|
import { useUserFavoritesStore } from 'features/UserFavorites/store' |
|
|
|
|
|
|
|
|
|
import { ProfileTypes, SportTypes } from 'config' |
|
|
|
|
@ -11,16 +12,19 @@ import { isMobileDevice } from 'config/userAgent' |
|
|
|
|
|
|
|
|
|
import { usePageParams } from 'hooks/usePageParams' |
|
|
|
|
|
|
|
|
|
import { TournamentType } from 'requests' |
|
|
|
|
import { TournamentType, SportInfo } from 'requests' |
|
|
|
|
|
|
|
|
|
import { isMatchPage } from 'helpers/isMatchPage' |
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
CountryFlag, |
|
|
|
|
CountryWrapper, |
|
|
|
|
FavoriteSign, |
|
|
|
|
Wrapper, |
|
|
|
|
SportWrapper, |
|
|
|
|
StyledLink, |
|
|
|
|
SubtitleMain, |
|
|
|
|
Tooltip, |
|
|
|
|
Wrapper, |
|
|
|
|
} from './styled' |
|
|
|
|
import { |
|
|
|
|
Time, |
|
|
|
|
@ -30,7 +34,9 @@ import { |
|
|
|
|
|
|
|
|
|
type Props = { |
|
|
|
|
countryId: number, |
|
|
|
|
countryInfo?: TournamentType, |
|
|
|
|
date?: string | null, |
|
|
|
|
sportInfo?: SportInfo, |
|
|
|
|
sportType?: SportTypes, |
|
|
|
|
time?: string | null, |
|
|
|
|
tournament: TournamentType, |
|
|
|
|
@ -38,7 +44,9 @@ type Props = { |
|
|
|
|
|
|
|
|
|
export const TournamentSubtitle = ({ |
|
|
|
|
countryId, |
|
|
|
|
countryInfo, |
|
|
|
|
date, |
|
|
|
|
sportInfo, |
|
|
|
|
sportType, |
|
|
|
|
time, |
|
|
|
|
tournament, |
|
|
|
|
@ -52,11 +60,25 @@ export const TournamentSubtitle = ({ |
|
|
|
|
<SubtitleMain> |
|
|
|
|
{!isLffClient && ( |
|
|
|
|
<Fragment> |
|
|
|
|
<SportIcon |
|
|
|
|
size={isMobileDevice ? 10 : '0.65rem'} |
|
|
|
|
sport={sportType ?? sportTypeFromUrl} |
|
|
|
|
/> |
|
|
|
|
<CountryFlag src={`https://instatscout.com/images/flags/48/${countryId}.png`} /> |
|
|
|
|
<SportWrapper> |
|
|
|
|
<SportIcon |
|
|
|
|
size={isMobileDevice ? 10 : '0.65rem'} |
|
|
|
|
sport={sportType ?? sportTypeFromUrl} |
|
|
|
|
/> |
|
|
|
|
{sportInfo && ( |
|
|
|
|
<Tooltip> |
|
|
|
|
<T9n t={sportInfo.lexic} /> |
|
|
|
|
</Tooltip> |
|
|
|
|
)} |
|
|
|
|
</SportWrapper> |
|
|
|
|
<CountryWrapper> |
|
|
|
|
<CountryFlag src={`https://instatscout.com/images/flags/48/${countryId}.png`} /> |
|
|
|
|
{countryInfo && ( |
|
|
|
|
<Tooltip> |
|
|
|
|
<Name nameObj={countryInfo} /> |
|
|
|
|
</Tooltip> |
|
|
|
|
)} |
|
|
|
|
</CountryWrapper> |
|
|
|
|
</Fragment> |
|
|
|
|
)} |
|
|
|
|
<StyledLink |
|
|
|
|
|