Ott 931 sign live (#336)

* feat(ott-931): added live sing

* feat(ott-931): fix line
keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Zoia 5 years ago committed by GitHub
parent 20e58e7c5a
commit d696c4b181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      src/features/MatchCard/CardFrontside/index.tsx
  2. 19
      src/features/MatchCard/styled.tsx

@ -8,12 +8,15 @@ import type { Match } from 'features/Matches'
import { SportName } from 'features/Common'
import { useMatchSwitchesStore } from 'features/MatchSwitches'
import { useName } from 'features/Name'
import { T9n } from 'features/T9n'
import { NoAccessMessage } from '../NoAccessMessage'
import {
CardWrapper,
Info,
LiveSign,
MatchDate,
MatchTimeInfo,
Preview,
PreviewWrapper,
Score,
@ -48,6 +51,7 @@ export const CardFrontside = ({
date,
formattedDate,
hasVideo,
live,
preview,
sportType,
storage,
@ -103,12 +107,19 @@ export const CardFrontside = ({
}
{!accessibleBySubscription && <BuyMatchBadge />}
{(accessibleBySubscription && !accessibleInUsersCountry) && <NoAccessMessage />}
<MatchDate>
{formattedDate}
{(isInFuture && (!hasVideo || !storage))
? <Time>{time}</Time>
: null}
</MatchDate>
<MatchTimeInfo>
<MatchDate>
{formattedDate}
{(isInFuture && (!hasVideo || !storage))
? <Time>{time}</Time>
: null}
</MatchDate>
{live && (
<LiveSign>
<T9n t='live' />
</LiveSign>
)}
</MatchTimeInfo>
</PreviewWrapper>
<Info>
{showSportName && <SportName sport={sportType} />}

@ -57,12 +57,20 @@ export const Preview = styled.img`
height: 100%;
`
export const MatchDate = styled.div`
export const MatchTimeInfo = styled.div`
position: absolute;
top: 25px;
left: 24px;
width: auto;
display: inline-flex;
@media ${devices.tablet} {
top: 10px;
left: 20px;
}
`
export const MatchDate = styled.div`
height: 24px;
border-radius: 2px;
padding: 8px;
@ -78,12 +86,13 @@ export const MatchDate = styled.div`
background-color: #6D6D6D;
@media ${devices.tablet} {
top: 10px;
left: 20px;
width: auto;
padding: 6px 8px;
}
`
export const LiveSign = styled(MatchDate)`
background-color: #CC0000;
margin-left: 10px;
`
export const Time = styled.span`
margin-left: 10px;

Loading…
Cancel
Save