|
|
|
@ -5,7 +5,6 @@ import { ProfileTypes } from 'config' |
|
|
|
import { |
|
|
|
import { |
|
|
|
getProfileLogo, |
|
|
|
getProfileLogo, |
|
|
|
getSportColor, |
|
|
|
getSportColor, |
|
|
|
getSportLexic, |
|
|
|
|
|
|
|
getProfileFallbackLogo, |
|
|
|
getProfileFallbackLogo, |
|
|
|
getProfileUrl, |
|
|
|
getProfileUrl, |
|
|
|
} from 'helpers' |
|
|
|
} from 'helpers' |
|
|
|
@ -28,8 +27,6 @@ export const useNormalizedItems = (searchItems: SearchItems) => { |
|
|
|
const lastName = player[`lastname_${suffix}` as Lastname] |
|
|
|
const lastName = player[`lastname_${suffix}` as Lastname] |
|
|
|
const teamName = player.team?.[`name_${suffix}` as Name] |
|
|
|
const teamName = player.team?.[`name_${suffix}` as Name] |
|
|
|
|
|
|
|
|
|
|
|
const sportLexic = getSportLexic(sportType) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const logo = getProfileLogo({ |
|
|
|
const logo = getProfileLogo({ |
|
|
|
id, |
|
|
|
id, |
|
|
|
profileType, |
|
|
|
profileType, |
|
|
|
@ -51,7 +48,7 @@ export const useNormalizedItems = (searchItems: SearchItems) => { |
|
|
|
profileType: ProfileTypes.PLAYERS, |
|
|
|
profileType: ProfileTypes.PLAYERS, |
|
|
|
sportType, |
|
|
|
sportType, |
|
|
|
}), |
|
|
|
}), |
|
|
|
sportLexic, |
|
|
|
sportType, |
|
|
|
teamOrCountry: teamName, |
|
|
|
teamOrCountry: teamName, |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
@ -61,8 +58,6 @@ export const useNormalizedItems = (searchItems: SearchItems) => { |
|
|
|
const profileType = ProfileTypes.TEAMS |
|
|
|
const profileType = ProfileTypes.TEAMS |
|
|
|
const name = team[`name_${suffix}` as Name] |
|
|
|
const name = team[`name_${suffix}` as Name] |
|
|
|
|
|
|
|
|
|
|
|
const sportLexic = getSportLexic(sportType) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const logo = getProfileLogo({ |
|
|
|
const logo = getProfileLogo({ |
|
|
|
id, |
|
|
|
id, |
|
|
|
profileType, |
|
|
|
profileType, |
|
|
|
@ -86,7 +81,7 @@ export const useNormalizedItems = (searchItems: SearchItems) => { |
|
|
|
profileType: ProfileTypes.TEAMS, |
|
|
|
profileType: ProfileTypes.TEAMS, |
|
|
|
sportType, |
|
|
|
sportType, |
|
|
|
}), |
|
|
|
}), |
|
|
|
sportLexic, |
|
|
|
sportType, |
|
|
|
teamOrCountry: country, |
|
|
|
teamOrCountry: country, |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
@ -96,8 +91,6 @@ export const useNormalizedItems = (searchItems: SearchItems) => { |
|
|
|
const { id, sport: sportType } = tournament |
|
|
|
const { id, sport: sportType } = tournament |
|
|
|
const name = tournament[`name_${suffix}` as Name] |
|
|
|
const name = tournament[`name_${suffix}` as Name] |
|
|
|
|
|
|
|
|
|
|
|
const sportLexic = getSportLexic(sportType) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const logo = getProfileLogo({ |
|
|
|
const logo = getProfileLogo({ |
|
|
|
id, |
|
|
|
id, |
|
|
|
profileType, |
|
|
|
profileType, |
|
|
|
@ -121,7 +114,7 @@ export const useNormalizedItems = (searchItems: SearchItems) => { |
|
|
|
profileType: ProfileTypes.TOURNAMENTS, |
|
|
|
profileType: ProfileTypes.TOURNAMENTS, |
|
|
|
sportType, |
|
|
|
sportType, |
|
|
|
}), |
|
|
|
}), |
|
|
|
sportLexic, |
|
|
|
sportType, |
|
|
|
teamOrCountry: country, |
|
|
|
teamOrCountry: country, |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|