@ -2,17 +2,16 @@ import type { BaseSyntheticEvent } from 'react'
import React , { useCallback } from 'react'
import styled from 'styled-components/macro'
import format from 'date-fns/format'
import { devices } from 'config/devices'
import type { Match } from 'features/Matches'
import { getSportColor , handleImageError } from 'helpers'
import { SportName } from 'features/Common'
import { T9n } from 'features/T9n'
import {
MatchStatus as CommonMatchStatus ,
MatchDate ,
CardWrapper as CommonCardWrapper ,
Time ,
Info ,
PreviewWrapper ,
Team ,
@ -21,12 +20,6 @@ import {
TournamentName ,
} from '../styled'
const MatchStatus = styled ( CommonMatchStatus ) `
top : 20px ;
color : rgba ( 255 , 255 , 255 , 0.3 ) ;
border : 1px solid currentColor ;
`
const CardWrapper = styled ( CommonCardWrapper ) `
cursor : pointer ;
`
@ -71,11 +64,10 @@ export const CardSoon = ({
team1Name ,
team2Logo ,
team2Name ,
time ,
tournamentName ,
} ,
} : CardSoonProps ) = > {
const startTime = format ( new Date ( date ) , 'HH:mm' )
const onError = useCallback ( ( e : BaseSyntheticEvent ) = > handleImageError ( {
e ,
sport : sportType ,
@ -84,7 +76,12 @@ export const CardSoon = ({
return (
< CardWrapper >
< MatchStatus > < T9n t = 'kickoff_in' / > { startTime } < / MatchStatus >
< MatchDate >
{ date }
< Time >
{ time }
< / Time >
< / MatchDate >
< PreviewWrapper >
< TeamLogos >
< TeamLogo