diff --git a/src/config/clients/facr.tsx b/src/config/clients/facr.tsx index 9475a216..acc29599 100644 --- a/src/config/clients/facr.tsx +++ b/src/config/clients/facr.tsx @@ -23,7 +23,7 @@ export const facr: ClientConfig = { }, defaultLanguage: 'cs', description: 'Live sports streaming platform. All matches playing under the auspices of Czech Republic FA. Access to full matches, various player playlists, and highlights. Free access in the Czech Republic. Available across all devices', - disabledPreferences: true, + disabledPreferences: false, name: ClientNames.Facr, privacyLink: '/clients/facr/terms-and-conditions.html', requests: { diff --git a/src/features/App/AuthenticatedApp.tsx b/src/features/App/AuthenticatedApp.tsx index 4edb35ef..500b186f 100644 --- a/src/features/App/AuthenticatedApp.tsx +++ b/src/features/App/AuthenticatedApp.tsx @@ -9,6 +9,7 @@ import { import { indexLexics } from 'config/lexics/indexLexics' import { isProduction } from 'config/env' import { PAGES } from 'config/pages' +import { client } from 'config/clients' import { StripeElements } from 'features/StripeElements' @@ -20,6 +21,7 @@ import { UserFavoritesStore } from 'features/UserFavorites/store' import { MatchPopup, MatchPopupStore } from 'features/MatchPopup' import { BuyMatchPopup, BuyMatchPopupStore } from 'features/BuyMatchPopup' import { PreferencesPopup, PreferencesPopupStore } from 'features/PreferencesPopup' +import { TournamentsPopup } from 'features/TournamentsPopup' import { CardsStore } from 'features/CardsStore' import { NoNetworkPopup, NoNetworkPopupStore } from 'features/NoNetworkPopup' @@ -46,7 +48,7 @@ export const AuthenticatedApp = () => { - + { client.name === 'facr' ? : } {/* в Switch как прямой children можно рендерить только Route или Redirect */} diff --git a/src/features/Menu/index.tsx b/src/features/Menu/index.tsx index f46e1b0a..1999717b 100644 --- a/src/features/Menu/index.tsx +++ b/src/features/Menu/index.tsx @@ -5,8 +5,9 @@ import { client } from 'config/clients' import { PAGES } from 'config/pages' import { usePreferencesStore } from 'features/PreferencesPopup' - +import { useTournamentsPopup } from 'features/TournamentsPopup/hooks' import { FavoritesMobilePopup } from '../FavoritesMobilePopup' + import { MenuList, MenuItem, @@ -15,6 +16,7 @@ import { export const Menu = () => { const { openPopup } = usePreferencesStore() + const { openTournamentsPopup } = useTournamentsPopup() const isHomePage = useRouteMatch(PAGES.home)?.isExact return ( @@ -22,7 +24,7 @@ export const Menu = () => { {isMobileDevice && } { isHomePage && !client.disabledPreferences && ( - + ) diff --git a/src/features/TournamentsPopup/hooks.tsx b/src/features/TournamentsPopup/hooks.tsx new file mode 100644 index 00000000..682680fd --- /dev/null +++ b/src/features/TournamentsPopup/hooks.tsx @@ -0,0 +1,19 @@ +import { useState } from 'react' + +export const useTournamentsPopup = () => { + const [isOpen, setIsOpen] = useState(false) + + const closePopup = () => { + setIsOpen(false) + } + + const openTournamentsPopup = () => { + setIsOpen(true) + } + + return { + closePopup, + isOpen, + openTournamentsPopup, + } +} diff --git a/src/features/TournamentsPopup/index.tsx b/src/features/TournamentsPopup/index.tsx new file mode 100644 index 00000000..dd2eb117 --- /dev/null +++ b/src/features/TournamentsPopup/index.tsx @@ -0,0 +1,43 @@ +// import { HeaderActions, CloseButton } from 'features/PopupComponents' +// import { T9n } from 'features/T9n' + +// import { SportsList } from './components/SportList' +// import { TournamentsBlock } from './components/TournamentsBlock' +import { HeaderActions, CloseButton } from 'features/PopupComponents' +import { T9n } from 'features/T9n' + +import { + Modal, + Wrapper, + Header, + HeaderTitle, + // Body, + // Footer, + // ApplyButton, +} from 'features/PreferencesPopup/styled' + +import { useTournamentsPopup } from './hooks' + +export const TournamentsPopup = () => { + const { closePopup, isOpen } = useTournamentsPopup() +console.log('isOpen', isOpen) + + return ( + + +
+ + + + + + +
+
+
+ ) +} diff --git a/src/features/TournamentsPopup/styled.tsx b/src/features/TournamentsPopup/styled.tsx new file mode 100644 index 00000000..f118abc0 --- /dev/null +++ b/src/features/TournamentsPopup/styled.tsx @@ -0,0 +1,8 @@ +import styled, { css } from 'styled-components/macro' + +import { isMobileDevice } from 'config/userAgent' + +import { Modal } from 'features/PreferencesPopup/styled' + +export const ScModal = styled(Modal)` +`