feat: 🎸 (770) added GK label in match popup (#288)

* feat: 🎸 (770) added GK label in match popup

* quick fix
keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Arthur 5 years ago committed by GitHub
parent e349d12a14
commit e4b9627e95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/config/lexics/indexLexics.tsx
  2. 1
      src/features/MatchPage/types.tsx
  3. 10
      src/features/MatchPopup/components/PlayersList/index.tsx
  4. 38
      src/features/MatchPopup/components/PlayersList/styled.tsx

@ -3,6 +3,7 @@ import { proceduresLexics } from './procedures'
const matchPopupLexics = {
apply: 13491,
episode_duration: 13410,
gk: 3515,
go_back_to_match: 13405,
match_interviews: 13031,
match_settings: 13490,

@ -15,6 +15,7 @@ export type MatchPlaylistOption = {
}
export type PlayerPlaylistOption = {
gk?: boolean,
id: number,
name_eng: string,
name_rus: string,

@ -2,6 +2,7 @@ import map from 'lodash/map'
import { ProfileTypes } from 'config'
import { T9n } from 'features/T9n'
import { PlayerPlaylistOptions } from 'features/MatchPage/types'
import { useMatchPopupStore } from 'features/MatchPopup/store'
@ -12,6 +13,8 @@ import {
Logo,
PlayerName,
Button,
PlayerPhoto,
PlayerGk,
} from './styled'
type Props = {
@ -37,6 +40,7 @@ export const PlayersList = ({
map(players, (player) => (
<Item key={player.id} isReady={allLoaded}>
<Button onClick={() => handlePlayerClick(player)}>
<PlayerPhoto>
<Logo
id={player.id}
sportType={match.sportType}
@ -44,6 +48,12 @@ export const PlayersList = ({
team={team}
onLoad={() => onLoad(player.id)}
/>
{player.gk && (
<PlayerGk>
<T9n t='gk' />
</PlayerGk>
)}
</PlayerPhoto>
<PlayerName nameObj={player} />
</Button>
</Item>

@ -34,7 +34,8 @@ export const List = styled.ul<ListProps>`
export const Item = styled.li<ItemProps>`
width: 76px;
height: 95px;
min-height: 95px;
max-height: 110px;
margin: 10px;
transition: .3s;
opacity: ${({ isReady }) => (
@ -77,20 +78,13 @@ type LogoProps = {
}
export const Logo = styled(ProfileLogo)<LogoProps>`
width: 65px;
height: 65px;
width: 100%;
border-radius: 50%;
background-color: ${({ team }) => (
team === Teams.TEAM1
? '#222222'
: '#FFFFFF'
)};
@media ${devices.mobile} {
width: 49px;
height: 49px;
margin-right: 11px;
}
`
export const PlayerName = styled(Name)`
@ -109,3 +103,29 @@ export const PlayerName = styled(Name)`
letter-spacing: 0.1px;
}
`
export const PlayerPhoto = styled.div`
position: relative;
width: 65px;
height: 65px;
margin-bottom: 10px;
@media ${devices.mobile} {
width: 49px;
height: 49px;
margin-right: 11px;
}
`
export const PlayerGk = styled.span`
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%, 50%);
width: 24px;
font-weight: bold;
font-size: 9px;
line-height: 12px;
background-color: #fff;
border-radius: 12px;
`

Loading…
Cancel
Save