fix(#2317): add condition for show switch

keep-around/161629a114e6c330dbdfc9ec84e1c2baf59aaf33
Andrei Dekterev 4 years ago
parent ad4a33c812
commit 161629a114
  1. 2
      Makefile
  2. 4
      src/features/ProfileHeader/index.tsx
  3. 8
      src/stores/index.ts
  4. 21
      src/stores/matchesStore.tsx

@ -124,7 +124,7 @@ stage: build-stage
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/wwwroot/
a-stage: build-a
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/a-wwwroot/
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@10.0.3.8:/usr/local/www/ott-staging/a-wwwroot/
b-stage: build-b
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/b-wwwroot/

@ -9,6 +9,7 @@ import {
} from 'config'
import { client } from 'config/clients'
import { isMobileDevice } from 'config/userAgent'
import { Menu } from 'features/Menu'
import { Search } from 'features/Search'
@ -76,11 +77,12 @@ export const ProfileHeader = ({
<Position right={0.71}>
<HeaderGroup>
{!isMobileDevice ? <ScoreSwitch /> : null}
<Menu />
</HeaderGroup>
</Position>
</HeaderStyled>
<ScoreSwitch />
{isMobileDevice ? <ScoreSwitch /> : null}
</Fragment>
)
}

@ -1,8 +0,0 @@
import { createContext, useContext } from 'react'
import { MatchesStore } from './matchesStore'
export const RootStoreContext = createContext({
matchesStore: new MatchesStore(),
})
export const useStores = () => useContext(RootStoreContext)

@ -1,21 +0,0 @@
import { makeAutoObservable, observable } from 'mobx'
import type { Match } from 'features/Matches/hooks'
export class MatchesStore {
matches: Array<Match> = []
constructor() {
makeAutoObservable(this, {
matches: observable,
})
}
getMatches() {
return this.matches
}
filterMatches(matches: Array<Match>, sport: number) {
this.matches = matches.filter((match) => match.sportType === sport)
}
}
Loading…
Cancel
Save