parent
08eca093b9
commit
e14ec8443d
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 38 KiB |
@ -1,5 +1,6 @@ |
||||
export const proceduresLexics = { |
||||
3556: 3556, |
||||
6959: 6959, |
||||
9760: 9760, |
||||
12980: 12980, |
||||
} |
||||
|
||||
@ -1,35 +1,13 @@ |
||||
import { SportTypes, ProfileTypes } from 'config' |
||||
import { ProfileTypes } from 'config' |
||||
|
||||
const FALLBACK_LOGOS = { |
||||
[SportTypes.BASKETBALL]: { |
||||
[ProfileTypes.PLAYERS]: 'https://basketball.instatscout.com/images/player-no-photo.png', |
||||
[ProfileTypes.TEAMS]: 'https://basketball.instatscout.com/images/team-no-photo.png', |
||||
[ProfileTypes.TOURNAMENTS]: 'https://basketball.instatscout.com/images/tournaments/180/no-photo.png', |
||||
}, |
||||
|
||||
[SportTypes.FOOTBALL]: { |
||||
[ProfileTypes.PLAYERS]: 'https://football.instatscout.com/images/player-no-photo.png', |
||||
[ProfileTypes.TEAMS]: 'https://football.instatscout.com/images/team-no-photo.png', |
||||
[ProfileTypes.TOURNAMENTS]: 'https://hockey.instatscout.com/images/tournaments/180/no-photo.png', |
||||
}, |
||||
|
||||
[SportTypes.HOCKEY]: { |
||||
[ProfileTypes.PLAYERS]: 'https://hockey.instatscout.com/images/player-no-photo.png', |
||||
[ProfileTypes.TEAMS]: 'https://hockey.instatscout.com/images/team-no-photo.png', |
||||
[ProfileTypes.TOURNAMENTS]: 'https://hockey.instatscout.com/images/tournaments/180/no-photo.png', |
||||
}, |
||||
} |
||||
|
||||
type Args = { |
||||
profileType: ProfileTypes, |
||||
sportType: SportTypes, |
||||
[ProfileTypes.PLAYERS]: '/images/player-fallback.png', |
||||
[ProfileTypes.TEAMS]: '/images/team-fallback.png', |
||||
[ProfileTypes.TOURNAMENTS]: '/images/tournament-fallback.png', |
||||
} |
||||
|
||||
export const getProfileFallbackLogo = ({ |
||||
profileType, |
||||
sportType = 1, |
||||
}: Args) => { |
||||
export const getProfileFallbackLogo = (profileType: ProfileTypes) => { |
||||
if (profileType === ProfileTypes.MATCHES) return '' |
||||
|
||||
return FALLBACK_LOGOS[sportType][profileType] |
||||
return FALLBACK_LOGOS[profileType] |
||||
} |
||||
|
||||
@ -1,9 +0,0 @@ |
||||
import { SportTypes } from 'config' |
||||
|
||||
const colors = { |
||||
[SportTypes.BASKETBALL]: '#f1903b', |
||||
[SportTypes.FOOTBALL]: '#00a435', |
||||
[SportTypes.HOCKEY]: '#5eb1ff', |
||||
} |
||||
|
||||
export const getSportColor = (sport: SportTypes) => colors[sport] |
||||
@ -1,9 +1,3 @@ |
||||
import { SportTypes } from 'config' |
||||
import { SportTypes, SPORT_NAMES } from 'config' |
||||
|
||||
const lexics = { |
||||
[SportTypes.FOOTBALL]: 'football', |
||||
[SportTypes.HOCKEY]: 'hockey', |
||||
[SportTypes.BASKETBALL]: 'basketball', |
||||
} |
||||
|
||||
export const getSportLexic = (sport: SportTypes) => lexics[sport] |
||||
export const getSportLexic = (sport: SportTypes) => SPORT_NAMES[sport] |
||||
|
||||
Loading…
Reference in new issue