|
|
|
|
@ -20,17 +20,27 @@ import { |
|
|
|
|
FavoriteSign, |
|
|
|
|
Wrapper, |
|
|
|
|
StyledLink, |
|
|
|
|
SubtitleMain, |
|
|
|
|
} from './styled' |
|
|
|
|
import { |
|
|
|
|
Time, |
|
|
|
|
MatchDate, |
|
|
|
|
Views, |
|
|
|
|
} from '../MatchPage/components/MatchDescription/styled' |
|
|
|
|
|
|
|
|
|
type Props = { |
|
|
|
|
countryId: number, |
|
|
|
|
date?: string | null, |
|
|
|
|
sportType?: SportTypes, |
|
|
|
|
time?: string | null, |
|
|
|
|
tournament: TournamentType, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export const TournamentSubtitle = ({ |
|
|
|
|
countryId, |
|
|
|
|
date, |
|
|
|
|
sportType, |
|
|
|
|
time, |
|
|
|
|
tournament, |
|
|
|
|
}: Props) => { |
|
|
|
|
const { isInFavorites } = useUserFavoritesStore() |
|
|
|
|
@ -39,25 +49,33 @@ export const TournamentSubtitle = ({ |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<Wrapper> |
|
|
|
|
{!isLffClient && ( |
|
|
|
|
<Fragment> |
|
|
|
|
<SportIcon |
|
|
|
|
size={isMobileDevice ? 10 : '0.65rem'} |
|
|
|
|
sport={sportType ?? sportTypeFromUrl} |
|
|
|
|
/> |
|
|
|
|
<CountryFlag src={`https://instatscout.com/images/flags/48/${countryId}.png`} /> |
|
|
|
|
</Fragment> |
|
|
|
|
<SubtitleMain> |
|
|
|
|
{!isLffClient && ( |
|
|
|
|
<Fragment> |
|
|
|
|
<SportIcon |
|
|
|
|
size={isMobileDevice ? 10 : '0.65rem'} |
|
|
|
|
sport={sportType ?? sportTypeFromUrl} |
|
|
|
|
/> |
|
|
|
|
<CountryFlag src={`https://instatscout.com/images/flags/48/${countryId}.png`} /> |
|
|
|
|
</Fragment> |
|
|
|
|
)} |
|
|
|
|
<StyledLink |
|
|
|
|
id={tournament.id} |
|
|
|
|
isLeftSide={isLffClient} |
|
|
|
|
isMatchPage={isMatchPage()} |
|
|
|
|
profileType={ProfileTypes.TOURNAMENTS} |
|
|
|
|
sportType={sportType ?? sportTypeFromUrl} |
|
|
|
|
> |
|
|
|
|
<Name nameObj={tournament} /> |
|
|
|
|
</StyledLink> |
|
|
|
|
{tournamentInFavorites && <FavoriteSign marginLeft={12} />} |
|
|
|
|
</SubtitleMain> |
|
|
|
|
{time && date && ( |
|
|
|
|
<Views> |
|
|
|
|
<Time>{time}</Time> |
|
|
|
|
<MatchDate>{date}</MatchDate> |
|
|
|
|
</Views> |
|
|
|
|
)} |
|
|
|
|
<StyledLink |
|
|
|
|
id={tournament.id} |
|
|
|
|
isLeftSide={isLffClient} |
|
|
|
|
isMatchPage={isMatchPage()} |
|
|
|
|
profileType={ProfileTypes.TOURNAMENTS} |
|
|
|
|
sportType={sportType ?? sportTypeFromUrl} |
|
|
|
|
> |
|
|
|
|
<Name nameObj={tournament} /> |
|
|
|
|
</StyledLink> |
|
|
|
|
{tournamentInFavorites && <FavoriteSign marginLeft={12} />} |
|
|
|
|
</Wrapper> |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|