|
|
|
|
@ -16,6 +16,8 @@ import { getCardColor } from 'helpers/getCardColor' |
|
|
|
|
|
|
|
|
|
import { NoAccessMessage } from '../../NoAccessMessage' |
|
|
|
|
import { getPrepareTimeFormat } from '../../helpers' |
|
|
|
|
import { getPrepareDateFormat } from '../../helpers/getPrepareDateFormat' |
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
CardWrapperOuter, |
|
|
|
|
CardWrapper, |
|
|
|
|
@ -38,11 +40,13 @@ import { |
|
|
|
|
NameSignWrapper, |
|
|
|
|
HoverFrame, |
|
|
|
|
ScDollar, |
|
|
|
|
MobTime, |
|
|
|
|
} from './styled' |
|
|
|
|
import { useCardPreview } from '../hooks' |
|
|
|
|
|
|
|
|
|
type Props = { |
|
|
|
|
isNeedFormatTimeChanged: boolean, |
|
|
|
|
isOwnedMatches: boolean, |
|
|
|
|
match: Match, |
|
|
|
|
onClick: () => void, |
|
|
|
|
onKeyPress: (e: KeyboardEvent<HTMLLIElement>) => void, |
|
|
|
|
@ -50,6 +54,7 @@ type Props = { |
|
|
|
|
|
|
|
|
|
export const CardFrontsideMobile = ({ |
|
|
|
|
isNeedFormatTimeChanged, |
|
|
|
|
isOwnedMatches, |
|
|
|
|
match, |
|
|
|
|
onClick, |
|
|
|
|
onKeyPress, |
|
|
|
|
@ -58,7 +63,6 @@ export const CardFrontsideMobile = ({ |
|
|
|
|
const { |
|
|
|
|
access, |
|
|
|
|
date, |
|
|
|
|
formattedDate, |
|
|
|
|
live, |
|
|
|
|
preview, |
|
|
|
|
previewURL, |
|
|
|
|
@ -89,6 +93,11 @@ export const CardFrontsideMobile = ({ |
|
|
|
|
time, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const prepareDate = getPrepareDateFormat({ |
|
|
|
|
date, |
|
|
|
|
isNeedFormatTimeChanged, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<CardWrapperOuter onClick={onClick} onKeyPress={onKeyPress}> |
|
|
|
|
<CardWrapper> |
|
|
|
|
@ -117,15 +126,19 @@ export const CardFrontsideMobile = ({ |
|
|
|
|
/> |
|
|
|
|
</TeamLogos> |
|
|
|
|
)} |
|
|
|
|
<MatchTimeInfo> |
|
|
|
|
<MatchDate isHomePage={isHomePage}> |
|
|
|
|
{isHomePage || isMatchPage ? null : formattedDate} |
|
|
|
|
{live && ( |
|
|
|
|
<LiveSign> |
|
|
|
|
<T9n t='live' /> |
|
|
|
|
</LiveSign> |
|
|
|
|
)} |
|
|
|
|
<MatchTimeInfo isOwnedMatches={isOwnedMatches}> |
|
|
|
|
<MatchDate |
|
|
|
|
isHomePage={isHomePage} |
|
|
|
|
isOwnedMatches={isOwnedMatches} |
|
|
|
|
> |
|
|
|
|
{isHomePage || isMatchPage ? null : prepareDate} |
|
|
|
|
{isOwnedMatches && <MobTime>{prepareTime}</MobTime> } |
|
|
|
|
</MatchDate> |
|
|
|
|
{live && ( |
|
|
|
|
<LiveSign> |
|
|
|
|
<T9n t='live' /> |
|
|
|
|
</LiveSign> |
|
|
|
|
)} |
|
|
|
|
</MatchTimeInfo> |
|
|
|
|
</PreviewWrapper> |
|
|
|
|
<Info> |
|
|
|
|
@ -146,7 +159,7 @@ export const CardFrontsideMobile = ({ |
|
|
|
|
</Team> |
|
|
|
|
</Teams> |
|
|
|
|
<SecondaryInfo> |
|
|
|
|
<Time>{prepareTime}</Time> |
|
|
|
|
{isHomePage || isMatchPage ? <Time>{prepareTime}</Time> : null} |
|
|
|
|
{access === MatchAccess.CanBuyMatch && ( |
|
|
|
|
<BuyMatchBadge> |
|
|
|
|
<ScDollar refIcon='Dollar' /> |
|
|
|
|
|