reducer/betsReducer

reducer/betsReducer

Methods

(static) betsReducer(state, action) → {state}

Source:
Properties:
Name Type Attributes Default Description
selectedMarket object <optional>
null
selectedSubselection number <optional>
0
selectedLeague object <optional>
null
selectedLeagueIndex number <optional>
null
isLeagueSelectionOpen boolean <optional>
false
haveLiveMatches boolean <optional>
false
markets Array <optional>
activeMarkets Array <optional>
null
leagues Array <optional>
null
matches Array <optional>
null
roundId number <optional>
null
roundEnd Time <optional>
null
liveId number <optional>
null
liveStart Time <optional>
null
repeatRoundCall number <optional>
0

Maximum 5 time to repeat round API

nextRound object <optional>
null

Contain number of week for betting round and live round when round API is called while is no betting time

initialBetsLoaded boolean <optional>
false
initialTurboBetsLoaded boolean <optional>
false
noBettingTimeCountdown number <optional>
0

Time when modal open

noBettingTime number <optional>
0

Time when placebet is disabled

liveMatchDuration number <optional>
0
isBetsLoading boolean <optional>
false
showNoBetTime boolean <optional>
false
roundLoading boolean <optional>
false
gameType string | null <optional>
null
showKickOff boolean

Show Kick Off button

Parameters:
Name Type Description
state object

Contain initial and final state of data

action object

Return the action object

Returns:
Type
state

(inner) CHANGE_PAGE(page)

Source:

[Action Creator] This action is use to change page

Example
changePage(payload)
Parameters:
Name Type Description
page string

(inner) FETCH_ROUND_SUCCESS()

Source:

[Received Data] This action is use to setup LIVE round and BETTING round

(inner) GET_INIT_SUCCESS()

Source:

[Received Data] This action is use to setup initial data

(inner) GET_ROUND_SUCCESS()

Source:

[Received Data] This action is use to set round data

(inner) GET_TURBO_ROUND_SUCCESS()

Source:

[Received Data] This action is use to set Turbo round data

(inner) GO_TO_LOGIN()

Source:

[Received Data] This action is use to set initialBetsLoaded and call round API again after login

(inner) GO_TO_LOGIN()

Source:

[Received Data] This action is use to set initialBetsLoaded

(inner) KICK_OFF_SUCCESS()

Source:

[Received Data] This action is use to set Turbo live data

(inner) REPEAT_CALL_SUCCESS()

Source:

[Received Data] This action is use to incrise number of round calls in one iteration , maximum is 5

(inner) SELECT_LEAGUE(league, index)

Source:

[Action Creator] This action is use to change selected league

Example
setSelectedLeague(payload)
Parameters:
Name Type Description
league object
index number

(inner) SELECT_MARKET(market)

Source:

[Action Creator] This action is use to change selected market and set default submarket if it has

Example
setSelectedMarket(payload)
Parameters:
Name Type Description
market object

(inner) SELECT_SUBSELECTION(submarkets, selectedSubselection)

Source:

[Action Creator] This action is use to change selected submarket

Example
setSelectedSubselection(payload)
Parameters:
Name Type Description
submarkets Array
selectedSubselection number

(inner) SELECT_SUBSELECTION()

Source:

[Action Creator] This action is used to remove live round using !! to convert extraDuration value if not sent from undefined to primitive Boolean value same as action.payload.extraDuration ? true : false

Example
liveFinished(payload)

(inner) SET_END_DATE()

Source:

[Received Data] This action is use to set Turbo countdown

(inner) SET_MARKETS()

Source:

[Action Creator] This action is use to change avaliable markets for selected league

Example
setMarkets(payload)

(inner) SET_ROUND_LOADER()

Source:

[Received Data] This action is use to set round loader

(inner) SET_STATISTICS()

Source:

[Action Creator] This action is used store statistics

Example
changePage(payload)

(inner) SET_STATISTICS()

Source:

[Action Creator] This action is used store statistics

Example
changePage(payload)

(inner) SET_TURBO_ROUND_ID()

Source:

[Action Creator] This action is used store turbo round id to avoid mixing them with "normal round id"

Example
changePage(payload)

(inner) SHOW_KICK_OFF(page)

Source:

[Action Creator] This action is use to show hide kick off butt

Example
changePage(payload)
Parameters:
Name Type Description
page string