fix(ott-300): moved fav store to abouve (#92)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Armen 5 years ago committed by GitHub
parent 2534688392
commit ccacbb2a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 41
      src/features/App/AuthenticatedApp.tsx
  2. 10
      src/features/MatchPage/index.tsx
  3. 7
      src/features/PlayerPage/index.tsx
  4. 7
      src/features/TeamPage/index.tsx
  5. 7
      src/features/TournamentPage/index.tsx

@ -22,6 +22,7 @@ import {
HeaderFiltersStore,
} from 'features/HeaderFilters'
import { UserFavorites } from 'features/UserFavorites'
import { UserFavoritesStore } from 'features/UserFavorites/store'
export const AuthenticatedApp = () => {
useLexicsConfig(indexLexics)
@ -36,28 +37,30 @@ export const AuthenticatedApp = () => {
</Route>
<HeaderFiltersStore>
<MainWrapper>
<UserFavorites />
<Header />
<Route exact path={PAGES.home}>
<HomePage />
</Route>
<UserFavoritesStore>
<MainWrapper>
<UserFavorites />
<Header />
<Route exact path={PAGES.home}>
<HomePage />
</Route>
<Route path={`/:sportName${PAGES.tournament}/:pageId`}>
<TournamentPage />
</Route>
<Route path={`/:sportName${PAGES.tournament}/:pageId`}>
<TournamentPage />
</Route>
<Route path={`/:sportName${PAGES.team}/:pageId`}>
<TeamPage />
</Route>
<Route path={`/:sportName${PAGES.player}/:pageId`}>
<PlayerPage />
</Route>
<Route path={`/:sportName${PAGES.match}/:pageId`}>
<MatchPage />
</Route>
<Route path={`/:sportName${PAGES.team}/:pageId`}>
<TeamPage />
</Route>
<Route path={`/:sportName${PAGES.player}/:pageId`}>
<PlayerPage />
</Route>
<Route path={`/:sportName${PAGES.match}/:pageId`}>
<MatchPage />
</Route>
</MainWrapper>
</MainWrapper>
</UserFavoritesStore>
</HeaderFiltersStore>
<Redirect to={PAGES.home} />
</Switch>

@ -1,7 +1,5 @@
import React from 'react'
import { UserFavoritesStore } from 'features/UserFavorites/store'
import { MatchProfileCard } from './MatchProfileCard'
import {
@ -9,9 +7,7 @@ import {
} from './styled'
export const MatchPage = () => (
<UserFavoritesStore>
<MainWrapper>
<MatchProfileCard />
</MainWrapper>
</UserFavoritesStore>
<MainWrapper>
<MatchProfileCard />
</MainWrapper>
)

@ -1,9 +1,8 @@
import React from 'react'
import React, { Fragment } from 'react'
import { ProfileTypes } from 'config'
import { UserFavorites } from 'features/UserFavorites'
import { ProfileCard } from 'features/ProfileCard'
import { UserFavoritesStore } from 'features/UserFavorites/store'
import { usePlayerPage } from './hooks'
@ -14,13 +13,13 @@ export const PlayerPage = () => {
} = usePlayerPage()
return (
<UserFavoritesStore>
<Fragment>
<UserFavorites />
<ProfileCard
profileType={ProfileTypes.PLAYERS}
name={name}
infoItems={infoItems}
/>
</UserFavoritesStore>
</Fragment>
)
}

@ -1,10 +1,9 @@
import React from 'react'
import React, { Fragment } from 'react'
import { ProfileTypes } from 'config'
import { UserFavorites } from 'features/UserFavorites'
import { ProfileCard } from 'features/ProfileCard'
import { UserFavoritesStore } from 'features/UserFavorites/store'
import { Matches } from 'features/Matches'
import { useTeamPage } from './hooks'
@ -17,7 +16,7 @@ export const TeamPage = () => {
} = useTeamPage()
return (
<UserFavoritesStore>
<Fragment>
<UserFavorites />
<Content>
<ProfileCard
@ -27,6 +26,6 @@ export const TeamPage = () => {
/>
<Matches />
</Content>
</UserFavoritesStore>
</Fragment>
)
}

@ -1,11 +1,10 @@
import React from 'react'
import React, { Fragment } from 'react'
import { ProfileTypes } from 'config'
import { UserFavorites } from 'features/UserFavorites'
import { ProfileCard } from 'features/ProfileCard'
import { Matches } from 'features/Matches'
import { UserFavoritesStore } from 'features/UserFavorites/store'
import { useTournamentPage } from './hooks'
import { Content } from './styled'
@ -17,7 +16,7 @@ export const TournamentPage = () => {
} = useTournamentPage()
return (
<UserFavoritesStore>
<Fragment>
<UserFavorites />
<Content>
<ProfileCard
@ -27,6 +26,6 @@ export const TournamentPage = () => {
/>
<Matches />
</Content>
</UserFavoritesStore>
</Fragment>
)
}

Loading…
Cancel
Save