Ott 294 get matches tmp (#87)

* fix(ott-287): changed default football to null

* fix(ott-287): minor bug

* fix(ott-294): changed name

* fix(ott-294): added default sport type
keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Armen 5 years ago committed by GitHub
parent c4904601d8
commit b4ebffe955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/config/procedures.tsx
  2. 2
      src/features/HeaderFilters/store/hooks/index.tsx
  3. 2
      src/helpers/getProfileFallbackLogo/index.tsx
  4. 2
      src/requests/getMatches.tsx
  5. 2
      src/requests/getSportTournaments.tsx

@ -2,7 +2,7 @@ export const PROCEDURES = {
auth_user: 'auth_user', auth_user: 'auth_user',
create_user: 'create_user', create_user: 'create_user',
get_cities: 'get_cities', get_cities: 'get_cities',
get_matches: 'get_matches_tmp', get_matches: 'get_matches',
get_player_info: 'get_player_info', get_player_info: 'get_player_info',
get_players_teams_tournaments: 'get_players_teams_tournaments', get_players_teams_tournaments: 'get_players_teams_tournaments',
get_sport_list: 'get_sport_list', get_sport_list: 'get_sport_list',

@ -51,7 +51,7 @@ export const useFilters = () => {
} = useLexicsStore() } = useLexicsStore()
const [selectedDate, setSelectedDate] = useState(new Date()) const [selectedDate, setSelectedDate] = useState(new Date())
const [selectedMatchStatus, setSelectedMatchStatus] = useState<MatchStatuses>(MatchStatuses.Live) const [selectedMatchStatus, setSelectedMatchStatus] = useState<MatchStatuses>(MatchStatuses.Live)
const [selectedSportTypeId, setSelectedSportTypeId] = useState<SportTypes>(SportTypes.FOOTBALL) const [selectedSportTypeId, setSelectedSportTypeId] = useState<SportTypes | null>(null)
const [selectedTournamentId, setSelectedTournamentId] = useState<number | null>(null) const [selectedTournamentId, setSelectedTournamentId] = useState<number | null>(null)
const [matches, setMatches] = useState<Matches>({ const [matches, setMatches] = useState<Matches>({
broadcast: [], broadcast: [],

@ -27,7 +27,7 @@ type Args = {
export const getProfileFallbackLogo = ({ export const getProfileFallbackLogo = ({
profileType, profileType,
sportType, sportType = 1,
}: Args) => ( }: Args) => (
FALLBACK_LOGOS[sportType][profileType] FALLBACK_LOGOS[sportType][profileType]
) )

@ -52,7 +52,7 @@ export type Team = {
type Args = { type Args = {
date: string, date: string,
matchStatus: MatchStatuses, matchStatus: MatchStatuses,
sportType: SportTypes, sportType: SportTypes | null,
tournamentId: number | null, tournamentId: number | null,
} }

@ -27,7 +27,7 @@ export type Tournament = {
export type Tournaments = Array<Tournament> export type Tournaments = Array<Tournament>
export const getSportTournaments = (sportId: number): Promise<Tournaments> => { export const getSportTournaments = (sportId: number | null): Promise<Tournaments> => {
const config = { const config = {
body: { body: {
params: { params: {

Loading…
Cancel
Save