From 02c72a87f11268a3439847df704f6b80a66eda96 Mon Sep 17 00:00:00 2001 From: Farber Denis Date: Mon, 17 Jul 2023 12:25:05 +0300 Subject: [PATCH 1/2] fix(#in730): facr header settings popup temp disable --- src/features/App/AuthenticatedApp.tsx | 16 ++++++++++++---- src/features/Menu/index.tsx | 23 ++++++++++++++--------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/features/App/AuthenticatedApp.tsx b/src/features/App/AuthenticatedApp.tsx index 7cb4c33a..ccd2ebe8 100644 --- a/src/features/App/AuthenticatedApp.tsx +++ b/src/features/App/AuthenticatedApp.tsx @@ -10,7 +10,7 @@ import { RecoilRoot } from 'recoil' import { indexLexics } from 'config/lexics/indexLexics' import { - client, + // client, PAGES, isProduction, isMobileDevice, @@ -23,8 +23,11 @@ import { MatchSwitchesStore } from 'features/MatchSwitches' import { UserFavoritesStore } from 'features/UserFavorites/store' import { MatchPopup, MatchPopupStore } from 'features/MatchPopup' import { BuyMatchPopupStore } from 'features/BuyMatchPopup' -import { PreferencesPopup, PreferencesPopupStore } from 'features/PreferencesPopup' -import { TournamentsPopup } from 'features/TournamentsPopup' +import { + // PreferencesPopup, + PreferencesPopupStore, +} from 'features/PreferencesPopup' +// import { TournamentsPopup } from 'features/TournamentsPopup' import { TournamentPopupStore } from 'features/TournamentsPopup/store' import { CardsStore } from 'features/CardsStore' import { NoNetworkPopup, NoNetworkPopupStore } from 'features/NoNetworkPopup' @@ -63,7 +66,12 @@ export const AuthenticatedApp = () => { - { client.name === 'facr' ? : } + {/* временно отключено по задаче IN-730 */} + {/* { + client.name === 'facr' + ? + : + } */} {/* в Switch как прямой children можно рендерить только Route или Redirect */} diff --git a/src/features/Menu/index.tsx b/src/features/Menu/index.tsx index 9ef08b14..9bef892b 100644 --- a/src/features/Menu/index.tsx +++ b/src/features/Menu/index.tsx @@ -1,11 +1,16 @@ -import { Link, useRouteMatch } from 'react-router-dom' +// кнопка настроек в хедере facr +// временно отключена по задаче IN-730 +import { + Link, + // useRouteMatch +} from 'react-router-dom' import { isMobileDevice } from 'config/userAgent' -import { client } from 'config/clients' +// import { client } from 'config/clients' import { PAGES } from 'config/pages' -import { usePreferencesStore } from 'features/PreferencesPopup' -import { useTournamentPopupStore } from 'features/TournamentsPopup/store' +// import { usePreferencesStore } from 'features/PreferencesPopup' +// import { useTournamentPopupStore } from 'features/TournamentsPopup/store' import { useAuthStore } from 'features/AuthStore' import { FavoritesMobilePopup } from '../FavoritesMobilePopup' @@ -17,21 +22,21 @@ import { } from './styled' export const Menu = () => { - const { openPopup } = usePreferencesStore() - const { open } = useTournamentPopupStore() - const isHomePage = useRouteMatch(PAGES.home)?.isExact + // const { openPopup } = usePreferencesStore() + // const { open } = useTournamentPopupStore() + // const isHomePage = useRouteMatch(PAGES.home)?.isExact const { logout, user } = useAuthStore() return ( {isMobileDevice && } - { + {/* { isHomePage && !client.disabledPreferences && ( ) - } + } */} { e.preventDefault() !user && logout('saveToken') -- 2.30.2 From 9f0c77924662e852e69d6f3a1d9403b315049bb4 Mon Sep 17 00:00:00 2001 From: andreidekterev Date: Tue, 18 Jul 2023 15:46:42 +0700 Subject: [PATCH 2/2] fix(#734): add watermark for india --- src/features/StreamPlayer/index.tsx | 6 ++++-- src/requests/getMatchInfo.tsx | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/features/StreamPlayer/index.tsx b/src/features/StreamPlayer/index.tsx index b5d1d2bc..72f67257 100644 --- a/src/features/StreamPlayer/index.tsx +++ b/src/features/StreamPlayer/index.tsx @@ -42,6 +42,8 @@ import { const tournamentsWithWatermark = { 316: 'Tunisia', 1136: 'Brasil', + 1448: 'India', + 5950: 'India', } /** * HLS плеер, применяется на лайв и завершенных матчах @@ -163,9 +165,9 @@ export const StreamPlayer = (props: Props) => { {user - && Boolean( + && (Boolean( tournamentsWithWatermark[profile?.tournament.id as keyof typeof tournamentsWithWatermark], - ) + ) || profile?.watermark) && playing && isLive && ( diff --git a/src/requests/getMatchInfo.tsx b/src/requests/getMatchInfo.tsx index 14504d6d..f6482695 100644 --- a/src/requests/getMatchInfo.tsx +++ b/src/requests/getMatchInfo.tsx @@ -68,6 +68,7 @@ export type MatchInfo = { team2: Team, tournament: MatchTournament, video_bounds?: VideoBounds, + watermark?: boolean, youtube_link?: string, } | null -- 2.30.2