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 = { |
export const proceduresLexics = { |
||||||
3556: 3556, |
3556: 3556, |
||||||
6959: 6959, |
6959: 6959, |
||||||
|
9760: 9760, |
||||||
12980: 12980, |
12980: 12980, |
||||||
} |
} |
||||||
|
|||||||
@ -1,35 +1,13 @@ |
|||||||
import { SportTypes, ProfileTypes } from 'config' |
import { ProfileTypes } from 'config' |
||||||
|
|
||||||
const FALLBACK_LOGOS = { |
const FALLBACK_LOGOS = { |
||||||
[SportTypes.BASKETBALL]: { |
[ProfileTypes.PLAYERS]: '/images/player-fallback.png', |
||||||
[ProfileTypes.PLAYERS]: 'https://basketball.instatscout.com/images/player-no-photo.png', |
[ProfileTypes.TEAMS]: '/images/team-fallback.png', |
||||||
[ProfileTypes.TEAMS]: 'https://basketball.instatscout.com/images/team-no-photo.png', |
[ProfileTypes.TOURNAMENTS]: '/images/tournament-fallback.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, |
|
||||||
} |
} |
||||||
|
|
||||||
export const getProfileFallbackLogo = ({ |
export const getProfileFallbackLogo = (profileType: ProfileTypes) => { |
||||||
profileType, |
|
||||||
sportType = 1, |
|
||||||
}: Args) => { |
|
||||||
if (profileType === ProfileTypes.MATCHES) return '' |
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 = { |
export const getSportLexic = (sport: SportTypes) => SPORT_NAMES[sport] |
||||||
[SportTypes.FOOTBALL]: 'football', |
|
||||||
[SportTypes.HOCKEY]: 'hockey', |
|
||||||
[SportTypes.BASKETBALL]: 'basketball', |
|
||||||
} |
|
||||||
|
|
||||||
export const getSportLexic = (sport: SportTypes) => lexics[sport] |
|
||||||
|
|||||||
Loading…
Reference in new issue