fix(1998): displaying date and time in match grid

keep-around/f3c52414987fe19fbb7ec1c327dc17a8d7be8229
Mirlan 4 years ago
parent 79b4f2f625
commit f3c5241498
  1. 6
      src/features/MatchCard/CardFrontside/index.tsx
  2. 7
      src/features/MatchCard/styled.tsx

@ -54,11 +54,9 @@ export const CardFrontside = ({
access,
date,
formattedDate,
hasVideo,
live,
preview,
sportType,
storage,
team1,
team2,
time,
@ -125,9 +123,7 @@ export const CardFrontside = ({
: (
<MatchDate isHomePage={isHomePage}>
{isHomePage ? null : formattedDate}
{(isInFuture && (!hasVideo || !storage))
? <Time>{time}</Time>
: null}
<Time>{time}</Time>
</MatchDate>
)}
</MatchTimeInfo>

@ -84,9 +84,10 @@ export const Preview = styled.img`
`
export const MatchTimeInfo = styled.div`
width: 100%;
position: absolute;
top: 0.519rem;
left: 0.519rem;
padding: 0 0.519rem;
`
type MatchDateProps = {
@ -94,6 +95,7 @@ type MatchDateProps = {
}
export const MatchDate = styled.div<MatchDateProps>`
width: fit-content;
height: 0.9rem;
border-radius: 2px;
padding: ${({ isHomePage }) => (!isHomePage ? '0 0.27rem' : '')};
@ -122,8 +124,7 @@ export const MatchDate = styled.div<MatchDateProps>`
export const LiveSign = styled(MatchDate)`
background-color: #CC0000;
position: absolute;
top: 0;
margin-left: auto;
`
export const Time = styled.span`

Loading…
Cancel
Save