|
|
|
|
@ -8,6 +8,7 @@ import { readToken } from 'helpers' |
|
|
|
|
|
|
|
|
|
const IMAGES_URLS = { |
|
|
|
|
[SportTypes.BASKETBALL]: 'https://basketball.instatscout.com/images', |
|
|
|
|
[SportTypes.BOXING]: '', |
|
|
|
|
[SportTypes.FOOTBALL]: 'https://instatscout.com/images', |
|
|
|
|
[SportTypes.HOCKEY]: 'https://hockey.instatscout.com/images', |
|
|
|
|
[SportTypes.HANDBALL]: 'https://handball.instatscout.com/images', |
|
|
|
|
@ -37,12 +38,18 @@ export const getProfileLogo = ({ |
|
|
|
|
size = 180, |
|
|
|
|
sportType, |
|
|
|
|
}: GetLogoArgs) => { |
|
|
|
|
// eslint-disable-next-line no-nested-ternary
|
|
|
|
|
const content = isTournamentSuper |
|
|
|
|
? `https://cf-aws-staging.insports.tv/media/tournaments/${sportType}/${id}/${MediaType.logo}.jpg?access_token=${readToken()}` |
|
|
|
|
: sportType === SportTypes.BOXING |
|
|
|
|
? `https://images.insports.tv/${sportType}/${PROFILE_NAMES[profileType]}/${id}.png` |
|
|
|
|
: `${IMAGES_URLS[sportType]}/${PROFILE_NAMES[profileType]}/${size}/${id}.png` |
|
|
|
|
let content = '' |
|
|
|
|
|
|
|
|
|
switch (true) { |
|
|
|
|
case isTournamentSuper: |
|
|
|
|
content = `https://cf-aws-staging.insports.tv/media/tournaments/${sportType}/${id}/${MediaType.logo}.jpg?access_token=${readToken()}` |
|
|
|
|
break |
|
|
|
|
case sportType === SportTypes.BOXING: |
|
|
|
|
content = `https://images.insports.tv/${sportType}/${PROFILE_NAMES[profileType]}/${id}.png` |
|
|
|
|
break |
|
|
|
|
default: |
|
|
|
|
content = `${IMAGES_URLS[sportType]}/${PROFILE_NAMES[profileType]}/${size}/${id}.png` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return content |
|
|
|
|
} |
|
|
|
|
|