diff --git a/src/features/MatchCard/CardFinished/index.tsx b/src/features/MatchCard/CardFinished/index.tsx index dd77f780..06f4fb29 100644 --- a/src/features/MatchCard/CardFinished/index.tsx +++ b/src/features/MatchCard/CardFinished/index.tsx @@ -1,38 +1,32 @@ import React from 'react' -import styled from 'styled-components/macro' - import type { Match } from 'features/Matches' import { getSportColor } from 'helpers' import { SportName } from 'features/Common' -import { T9n } from 'features/T9n' import { useCard } from '../hooks' import { CardFinishedHover } from '../CardFinishedHover' import { CardWrapper, Info, - MatchStatus as CommonMatchStatus, + MatchDate, Preview, PreviewWrapper, Score, Team, TeamName, Teams, + Time, TournamentName, } from '../styled' -const MatchStatus = styled(CommonMatchStatus)` - color: #313131; - background-color: #EACB6F; -` - type CardFinishedProps = { match: Match, } export const CardFinished = ({ match: { + date, id, preview, sportName, @@ -41,6 +35,7 @@ export const CardFinished = ({ team1Score, team2Name, team2Score, + time, tournamentName, }, }: CardFinishedProps) => { @@ -67,7 +62,12 @@ export const CardFinished = ({ onClick={open} onKeyPress={onKeyPress} > - + + {date} + + { @@ -67,7 +62,12 @@ export const CardLive = ({ onClick={open} onKeyPress={onKeyPress} > - + + {date} + + { - 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 ( - {startTime} + + {date} + + { {team1.name} )} - {!isHidden && ( - - {team1?.score} : {team2?.score} - - )} + {!isHidden + ? ( + + {team1?.score} : {team2?.score} + + ) + : } {team2 && ( { )} + ({ - date, + date: format(new Date(date), 'dd:MM:yy'), id, preview: '/images/preview.png', sportName: getSportLexic(sport), @@ -40,6 +42,7 @@ const prepareMatch = ({ }), team2Name: team2[`name_${suffix}` as Name], team2Score: team2.score, + time: format(new Date(date), 'HH:mm'), tournamentName: rest[`name_${suffix}` as Name], }))