From f666ceb265c0fdc3724a8997fb2c8ac2113b0ad3 Mon Sep 17 00:00:00 2001 From: andreidekterev Date: Fri, 7 Jul 2023 14:27:19 +0700 Subject: [PATCH] fix(supertournaments-logo-fix): add condition for supertournaments logo --- src/helpers/getProfileLogo/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helpers/getProfileLogo/index.tsx b/src/helpers/getProfileLogo/index.tsx index 4db7f887..0d8ac7ff 100644 --- a/src/helpers/getProfileLogo/index.tsx +++ b/src/helpers/getProfileLogo/index.tsx @@ -15,4 +15,8 @@ export const getProfileLogo = ({ id, profileType, sportType, -}: GetLogoArgs) => `${URL_AWS}/media/${PROFILE_NAMES[profileType]}/${sportType}/${id}/${profileType === ProfileTypes.PLAYERS ? 'photo.png' : 'logo.png'}` +}: GetLogoArgs) => { + const extension = ProfileTypes.SUPERTOURNAMENTS === profileType ? 'jpg' : 'png' + + return `${URL_AWS}/media/${PROFILE_NAMES[profileType]}/${sportType}/${id}/${profileType === ProfileTypes.PLAYERS ? `photo.${extension}` : `logo.${extension}`}` +}