feat(ott-1671): add buy match popup on match page (#509)
* feat(ott-1671): add buy match popup on match page * feat(ott-1671): fix prkeep-around/af30b88d367751c9e05a735e4a0467a96238ef47
parent
a00a4cef6c
commit
590ab5e390
@ -0,0 +1,28 @@ |
||||
import type { MatchInfo } from 'requests' |
||||
|
||||
import { SportTypes } from 'config' |
||||
|
||||
import type { Match } from 'features/BuyMatchPopup/types' |
||||
|
||||
type Args = { |
||||
matchId: number, |
||||
profile: MatchInfo, |
||||
sportType: SportTypes, |
||||
} |
||||
|
||||
export const prepareMatchProfile = ({ |
||||
matchId, |
||||
profile, |
||||
sportType, |
||||
}: Args): Match | null => { |
||||
if (!profile) return null |
||||
return { |
||||
calc: profile.calc, |
||||
hasVideo: profile.has_video, |
||||
id: matchId, |
||||
sportType, |
||||
team1: profile.team1, |
||||
team2: profile.team2, |
||||
tournament: profile.tournament, |
||||
} |
||||
} |
||||
Loading…
Reference in new issue