|
|
|
|
@ -1,7 +1,3 @@ |
|
|
|
|
import { useMemo } from 'react' |
|
|
|
|
|
|
|
|
|
import { Link } from 'react-router-dom' |
|
|
|
|
|
|
|
|
|
import type { ObjectWithName } from 'features/Name' |
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
@ -9,8 +5,6 @@ import { |
|
|
|
|
ProfileTypes, |
|
|
|
|
URL_AWS, |
|
|
|
|
} from 'config' |
|
|
|
|
import { client } from 'config/clients' |
|
|
|
|
import { ClientNames } from 'config/clients/types' |
|
|
|
|
|
|
|
|
|
import { checkPage } from 'helpers/checkPage' |
|
|
|
|
|
|
|
|
|
@ -29,7 +23,6 @@ import { |
|
|
|
|
InfoFlag, |
|
|
|
|
StyledLink, |
|
|
|
|
SсBtnWrapper, |
|
|
|
|
SсGetHighlightBtn, |
|
|
|
|
DetailsWrapper, |
|
|
|
|
} from './styled' |
|
|
|
|
import { useProfileCard } from './hooks' |
|
|
|
|
@ -50,13 +43,11 @@ export const ProfileCard = ({ profile }: ProfileType) => { |
|
|
|
|
isFavorite, |
|
|
|
|
profileId, |
|
|
|
|
profileType, |
|
|
|
|
setPlayerHighlight, |
|
|
|
|
sportType, |
|
|
|
|
toggleFavorites, |
|
|
|
|
} = useProfileCard() |
|
|
|
|
|
|
|
|
|
const tournamentId = profile.additionalInfo?.tournamentId |
|
|
|
|
const isPlayerPage = checkPage(PAGES.player) |
|
|
|
|
|
|
|
|
|
const setGoogleAnalylicsID = () => { |
|
|
|
|
switch (true) { |
|
|
|
|
@ -71,14 +62,16 @@ export const ProfileCard = ({ profile }: ProfileType) => { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const isGetHighLightShown = useMemo(() => { |
|
|
|
|
switch (client.name) { |
|
|
|
|
case ClientNames.Facr: |
|
|
|
|
return false |
|
|
|
|
default: |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
}, []) |
|
|
|
|
// const isPlayerPage = checkPage(PAGES.player)
|
|
|
|
|
//
|
|
|
|
|
// const isGetHighLightShown = useMemo(() => {
|
|
|
|
|
// switch (client.name) {
|
|
|
|
|
// case ClientNames.Facr:
|
|
|
|
|
// return false
|
|
|
|
|
// default:
|
|
|
|
|
// return true
|
|
|
|
|
// }
|
|
|
|
|
// }, [])
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<Wrapper> |
|
|
|
|
@ -115,6 +108,7 @@ export const ProfileCard = ({ profile }: ProfileType) => { |
|
|
|
|
<StarIcon isFavorite={isFavorite} /> |
|
|
|
|
<T9n t='add_to_favorites' /> |
|
|
|
|
</FavoriteButton> |
|
|
|
|
{/* временно отключили |
|
|
|
|
{!client.disabledHighlights && isPlayerPage && isGetHighLightShown && ( |
|
|
|
|
<Link to={PAGES.highlights}> |
|
|
|
|
<SсGetHighlightBtn |
|
|
|
|
@ -130,7 +124,7 @@ export const ProfileCard = ({ profile }: ProfileType) => { |
|
|
|
|
<T9n t='get_highlights' /> |
|
|
|
|
</SсGetHighlightBtn> |
|
|
|
|
</Link> |
|
|
|
|
)} |
|
|
|
|
)} */} |
|
|
|
|
</SсBtnWrapper> |
|
|
|
|
</DetailsWrapper> |
|
|
|
|
</Wrapper> |
|
|
|
|
|