|
|
|
|
@ -6,7 +6,6 @@ import type { MatchInfo } from 'requests/getMatchInfo' |
|
|
|
|
|
|
|
|
|
import { Name } from 'features/Name' |
|
|
|
|
import { SportIcon } from 'components/SportIcon/SportIcon' |
|
|
|
|
import { T9n } from 'features/T9n' |
|
|
|
|
import { useAuthStore } from 'features/AuthStore' |
|
|
|
|
import { useMatchSwitchesStore } from 'features/MatchSwitches' |
|
|
|
|
|
|
|
|
|
@ -21,7 +20,6 @@ import { |
|
|
|
|
Description, |
|
|
|
|
DescriptionInnerBlock, |
|
|
|
|
MatchDate, |
|
|
|
|
StyledDash, |
|
|
|
|
StyledLink, |
|
|
|
|
Score, |
|
|
|
|
Title, |
|
|
|
|
@ -46,17 +44,15 @@ export const MatchDescription = ({ |
|
|
|
|
const { |
|
|
|
|
country_id, |
|
|
|
|
date, |
|
|
|
|
live, |
|
|
|
|
team1, |
|
|
|
|
team2, |
|
|
|
|
tournament, |
|
|
|
|
} = profile |
|
|
|
|
|
|
|
|
|
const isChangedTimeFormat = includes(['US', 'CA'], user?.profile.country_code) |
|
|
|
|
const localDate = format(parseDate(date), |
|
|
|
|
live ? 'HH:mm' : 'MMMM d, y') |
|
|
|
|
const localDate = format(parseDate(date), 'MMMM d, y') |
|
|
|
|
const changedTimeFormat = format(parseDate(date), |
|
|
|
|
isChangedTimeFormat ? 'hh:mm aaa' : 'HH:mm') |
|
|
|
|
isChangedTimeFormat ? 'h:mm aaa' : 'HH:mm') |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<Description> |
|
|
|
|
@ -69,9 +65,13 @@ export const MatchDescription = ({ |
|
|
|
|
> |
|
|
|
|
<Name nameObj={team1} /> |
|
|
|
|
</StyledLink> |
|
|
|
|
{!isScoreHidden && <Score>{team1.score}</Score>} |
|
|
|
|
<StyledDash isScoreHidden={isScoreHidden}>-</StyledDash> |
|
|
|
|
{!isScoreHidden && <Score>{team2.score}</Score>} |
|
|
|
|
<Score> |
|
|
|
|
{ |
|
|
|
|
isScoreHidden || !team1.score || !team2.score |
|
|
|
|
? '-' |
|
|
|
|
: `${team1.score} - ${team2.score}` |
|
|
|
|
} |
|
|
|
|
</Score> |
|
|
|
|
<StyledLink |
|
|
|
|
id={team2.id} |
|
|
|
|
profileType={ProfileTypes.TEAMS} |
|
|
|
|
@ -79,7 +79,6 @@ export const MatchDescription = ({ |
|
|
|
|
> |
|
|
|
|
<Name nameObj={team2} /> |
|
|
|
|
</StyledLink> |
|
|
|
|
{live ? '\u00a0|\u00a0LIVE STREAM' : ''} |
|
|
|
|
</Title> |
|
|
|
|
<Tournament> |
|
|
|
|
<SportIcon sport={sportType} /> |
|
|
|
|
@ -96,11 +95,7 @@ export const MatchDescription = ({ |
|
|
|
|
</Tournament> |
|
|
|
|
</DescriptionInnerBlock> |
|
|
|
|
<Views> |
|
|
|
|
{ |
|
|
|
|
live |
|
|
|
|
? <T9n t='started_streaming_at' /> |
|
|
|
|
: <Time>{changedTimeFormat}</Time> |
|
|
|
|
} |
|
|
|
|
<Time>{changedTimeFormat}</Time> |
|
|
|
|
<MatchDate>{localDate}</MatchDate> |
|
|
|
|
</Views> |
|
|
|
|
</Description> |
|
|
|
|
|