diff --git a/src/features/App/AuthenticatedApp.tsx b/src/features/App/AuthenticatedApp.tsx
index 70a7282d..d7bfc320 100644
--- a/src/features/App/AuthenticatedApp.tsx
+++ b/src/features/App/AuthenticatedApp.tsx
@@ -6,69 +6,55 @@ import {
} from 'react-router-dom'
import { indexLexics } from 'config/lexics/indexLexics'
-import { useLexicsConfig } from 'features/LexicsStore'
import { PAGES } from 'config'
-import { devices } from 'config/devices'
+
+import { useLexicsConfig } from 'features/LexicsStore'
+
import { HomePage } from 'features/HomePage'
import { TeamPage } from 'features/TeamPage'
import { MatchPage } from 'features/MatchPage'
import { PlayerPage } from 'features/PlayerPage'
import { TournamentPage } from 'features/TournamentPage'
import { ExtendedSearchStore, ExtendedSearchPage } from 'features/ExtendedSearchPage'
-import { UserAccount } from 'features/UserAccount'
-import { MatchSwitchesStore } from 'features/MatchSwitches'
-import { MainWrapper } from 'features/MainWrapper'
+import { UserAccountForm } from 'features/UserAccount'
-import { UserFavorites } from 'features/UserFavorites'
+import { MatchSwitchesStore } from 'features/MatchSwitches'
import { UserFavoritesStore } from 'features/UserFavorites/store'
-import { useMediaQuery } from 'features/MediaQuery'
-import { FormStore } from 'features/FormStore'
export const AuthenticatedApp = () => {
useLexicsConfig(indexLexics)
- const isMobile = useMediaQuery({ query: devices.tablet })
return (
-
-
-
-
-
-
-
- {!isMobile && }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {/* в Switch как прямой children можно рендерить только Route или Redirect */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
-
-export const UserAccountForm = () => (
-
-
-
-)
diff --git a/src/features/ExtendedSearchPage/index.tsx b/src/features/ExtendedSearchPage/index.tsx
index 2af39a2b..a14a92cb 100644
--- a/src/features/ExtendedSearchPage/index.tsx
+++ b/src/features/ExtendedSearchPage/index.tsx
@@ -3,6 +3,7 @@ import React, { Fragment } from 'react'
import { devices } from 'config'
import { useMediaQuery } from 'features/MediaQuery'
+import { UserFavorites } from 'features/UserFavorites'
import { MobileHeader } from './components/MobileHeader'
import { DesktopHeader } from './components/DesktopHeader'
@@ -18,6 +19,7 @@ export const ExtendedSearchPage = () => {
const isMobile = useMediaQuery({ query: devices.tablet })
return (
+ {!isMobile && }
{
isMobile
?
diff --git a/src/features/HomePage/index.tsx b/src/features/HomePage/index.tsx
index cb227fe6..4c05781c 100644
--- a/src/features/HomePage/index.tsx
+++ b/src/features/HomePage/index.tsx
@@ -17,6 +17,8 @@ import {
HeaderMobileBottom,
} from 'features/HeaderMobile/styled'
import { SportFilterWrapper } from 'features/ProfileHeader/styled'
+import { MainWrapper } from 'features/MainWrapper'
+import { UserFavorites } from 'features/UserFavorites'
import { useHomePage } from './hooks'
import { Header } from './components/Header'
@@ -26,7 +28,7 @@ const Home = () => {
const isMobile = useMediaQuery({ query: devices.tablet })
const { fetchMatches } = useHomePage()
return (
-
+
{
isMobile
?
@@ -44,6 +46,7 @@ const Home = () => {
)
}
+ {!isMobile && }
@@ -55,7 +58,7 @@ const Home = () => {
)
}
-
+
)
}
diff --git a/src/features/MatchPage/index.tsx b/src/features/MatchPage/index.tsx
index 575efd62..1b5040e4 100644
--- a/src/features/MatchPage/index.tsx
+++ b/src/features/MatchPage/index.tsx
@@ -1,16 +1,21 @@
-import React, { Fragment } from 'react'
+import React from 'react'
import isEmpty from 'lodash/isEmpty'
+import { devices } from 'config'
+
import { StreamPlayer } from 'features/StreamPlayer'
import { MultiSourcePlayer } from 'features/MultiSourcePlayer'
import { ProfileHeader } from 'features/ProfileHeader'
+import { MainWrapper } from 'features/MainWrapper'
+import { UserFavorites } from 'features/UserFavorites'
+import { useMediaQuery } from 'features/MediaQuery'
import { MatchProfileCard } from './MatchProfileCard'
import { usePlayerProgressReporter } from './hooks/usePlayerProgressReporter'
import { useMatchProfile } from './hooks/useMatchProfile'
import { useVideoData } from './hooks/useVideoData'
-import { MainWrapper, Container } from './styled'
+import { MainWrapper as Wrapper, Container } from './styled'
export const MatchPage = () => {
const profile = useMatchProfile()
@@ -22,13 +27,16 @@ export const MatchPage = () => {
} = useVideoData()
const { onPlayerProgressChange, onPlayingChange } = usePlayerProgressReporter()
+ const isMobile = useMediaQuery({ query: devices.tablet })
+
const isLiveMatch = Boolean(url) && !isLastPlayPositionFetching
const isFinishedMatch = !isEmpty(videos) && !isLastPlayPositionFetching
return (
-
+
+ {!isMobile && }
-
+
{
@@ -52,7 +60,7 @@ export const MatchPage = () => {
)
}
-
-
+
+
)
}
diff --git a/src/features/PlayerPage/index.tsx b/src/features/PlayerPage/index.tsx
index b9c7ff57..a28462c1 100644
--- a/src/features/PlayerPage/index.tsx
+++ b/src/features/PlayerPage/index.tsx
@@ -1,10 +1,13 @@
-import React, { Fragment } from 'react'
+import React from 'react'
-import { ProfileTypes } from 'config'
+import { ProfileTypes, devices } from 'config'
import { ProfileHeader } from 'features/ProfileHeader'
import { ProfileCard } from 'features/ProfileCard'
import { Matches } from 'features/Matches'
+import { UserFavorites } from 'features/UserFavorites'
+import { MainWrapper } from 'features/MainWrapper'
+import { useMediaQuery } from 'features/MediaQuery'
import { usePlayerPage } from './hooks'
import { Content } from './styled'
@@ -15,9 +18,11 @@ export const PlayerPage = () => {
infoItems,
titleObj,
} = usePlayerPage()
+ const isMobile = useMediaQuery({ query: devices.tablet })
return (
-
+
+ {!isMobile && }
{
/>
-
+
)
}
diff --git a/src/features/TeamPage/index.tsx b/src/features/TeamPage/index.tsx
index 3d54ff51..a118ef8c 100644
--- a/src/features/TeamPage/index.tsx
+++ b/src/features/TeamPage/index.tsx
@@ -1,10 +1,13 @@
-import React, { Fragment } from 'react'
+import React from 'react'
-import { ProfileTypes } from 'config'
+import { ProfileTypes, devices } from 'config'
import { ProfileHeader } from 'features/ProfileHeader'
import { ProfileCard } from 'features/ProfileCard'
import { Matches } from 'features/Matches'
+import { UserFavorites } from 'features/UserFavorites'
+import { MainWrapper } from 'features/MainWrapper'
+import { useMediaQuery } from 'features/MediaQuery'
import { useTeamPage } from './hooks'
import { Content } from './styled'
@@ -15,9 +18,11 @@ export const TeamPage = () => {
infoItems,
titleObj,
} = useTeamPage()
+ const isMobile = useMediaQuery({ query: devices.tablet })
return (
-
+
+ {!isMobile && }
{
/>
-
+
)
}
diff --git a/src/features/TournamentPage/index.tsx b/src/features/TournamentPage/index.tsx
index 94cbd463..f051cd42 100644
--- a/src/features/TournamentPage/index.tsx
+++ b/src/features/TournamentPage/index.tsx
@@ -1,10 +1,13 @@
-import React, { Fragment } from 'react'
+import React from 'react'
-import { ProfileTypes } from 'config'
+import { ProfileTypes, devices } from 'config'
import { ProfileHeader } from 'features/ProfileHeader'
import { ProfileCard } from 'features/ProfileCard'
import { Matches } from 'features/Matches'
+import { MainWrapper } from 'features/MainWrapper'
+import { UserFavorites } from 'features/UserFavorites'
+import { useMediaQuery } from 'features/MediaQuery'
import { useTournamentPage } from './hooks'
import { Content } from './styled'
@@ -15,9 +18,11 @@ export const TournamentPage = () => {
infoItems,
titleObj,
} = useTournamentPage()
+ const isMobile = useMediaQuery({ query: devices.tablet })
return (
-
+
+ {!isMobile && }
{
/>
-
+
)
}
diff --git a/src/features/UserAccount/index.tsx b/src/features/UserAccount/index.tsx
index f02829fa..1ac8c5c2 100644
--- a/src/features/UserAccount/index.tsx
+++ b/src/features/UserAccount/index.tsx
@@ -9,6 +9,7 @@ import { Form } from 'features/Login/styled'
import { T9n } from 'features/T9n'
import { Error } from 'features/Common/Input/styled'
import { useLexicsConfig } from 'features/LexicsStore'
+import { FormStore } from 'features/FormStore'
import { useUserInfo } from './hooks/useUserInfo'
import { useUserSubscriptions } from './hooks/useUserSubscriptions'
@@ -32,7 +33,7 @@ import {
const labelWidth = 110
-export const UserAccount = () => {
+const UserAccount = () => {
useLexicsConfig(userAccountLexics)
const {
@@ -215,3 +216,9 @@ export const UserAccount = () => {
)
}
+
+export const UserAccountForm = () => (
+
+
+
+)