fix(#522): hide getHighlights btn

pull/158/head
Andrei Dekterev 3 years ago
parent 9205c61454
commit 6a8d3f9200
  1. 30
      src/features/ProfileCard/index.tsx
  2. 5
      src/features/UserAccount/index.tsx

@ -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>

@ -1,6 +1,6 @@
import { Fragment } from 'react'
import { Route, Link } from 'react-router-dom'
import { Route } from 'react-router-dom'
import { PAGES } from 'config'
import { isProduction } from 'config/env'
@ -34,7 +34,6 @@ import {
Navigations,
StyledLink,
UserAccountWrapper,
ScButtonGetHighlight,
} from './styled'
import { CompanyInfo } from '../CompanyInfo'
import { PoweredByInsports } from './components/PoweredByInsports/PoweredByInsports'
@ -91,6 +90,7 @@ const UserAccount = () => {
</Fragment>
)}
<ScoreSwitch />
{/* временно отключили
{!client.disabledHighlights && (
<Link to={`${PAGES.highlights}`}>
<ScButtonGetHighlight>
@ -98,6 +98,7 @@ const UserAccount = () => {
</ScButtonGetHighlight>
</Link>
)}
*/}
</Navigations>
</Aside>
<ContentWrapper>

Loading…
Cancel
Save