reducer/ticketsReducer

reducer/ticketsReducer

Methods

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

Source:
Properties:
Name Type Attributes Default Description
tickets Array <optional>
null
lastTimestamp Time <optional>
null
lastRunning number <optional>
1
betsPending boolean <optional>
false
noMoreBets boolean <optional>
false

Set to true when API return empty array. User has scrolled to the bottom

selectedTicket object <optional>
null
scrollTo number <optional>
0

Use when ucer come back from TICKET_DETAILS page to TICKETS page. Use to scroll to last previewed ticket.

numberOfBetsLive number <optional>
0

Number of placed bets for live week

numberOfBets number <optional>
0

Number showen into bottom navigation as number of bets

numberOfBetsLiveTurbo number <optional>
0

Number of placed bets for live week Turbo game

numberOfBetsTurbo number <optional>
0

Number showen into bottom navigation as number of bets Turbo game

numbets number <optional>
0

Number of bets loaded on API get tickets call

results Array <optional>
null
teams Array <optional>
null
ticketDates Array <optional>
null

Array of all dates on bet history page

leagueTableWeek number <optional>
''
isResultsLoading number <optional>
true
ticketsUpdated boolean <optional>

set to true when tickets get updated

Parameters:
Name Type Description
state object

Contain initial and final state of data

action object

Return the action object

Returns:
Type
state

(inner) CLEAR_MY_BETS()

Source:

[Action Creator] This action is use to clear tickets for another comming on TICKETS page

Example
clearMyBets(payload)

(inner) CLEAR_NUM_OF_BETS()

Source:

[Received Data] This action is use to clear number of bets

(inner) GET_INIT_SUCCESS()

Source:

[Received Data] This action is use to set numbets on initial call

(inner) GET_LEAGUE_TABLE_SUCCESS()

Source:

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

(inner) GET_RESULTS_TABLES_SUCCESS()

Source:

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

(inner) GET_TICKETS_NO_MORE_BETS()

Source:

[Received Data] This action is use to stop call getTicket because user got all tickets

(inner) GET_TICKETS_SUCCESS()

Source:

[Received Data] This action is use to set bet history data

(inner) LIVE_FINISHED()

Source:

[Action Creator] This action is use to recalculate number of placed bets after live finish

Example
liveFinished(payload)

(inner) RE_COUNT_BET()

Source:

[Received Data] This action is use to update the bet counter

(inner) SELECT_TICKET()

Source:

[Action Creator] This action is use to change selected tickets for details

Example
selectTicket(payload)

(inner) SELECT_TICKET()

Source:

[Action Creator] This action is use to reset results and leagueTable data

Example
resetResultsData(payload)

(inner) SET_BETS_LOADER()

Source:

[Received Data] This action is use to set bet history loader

(inner) SET_BLOCK_MULTIPLE_RE_COUNT()

Source:

[Received Data] This action is use to block multiple recount on multiple bet action

(inner) SET_NUM_OF_BETS()

Source:

[Received Data] This action is use to set number of placed bets

(inner) SET_SCROLL_POSITION()

Source:

[Action Creator] This action is used to set position of the scrollable element

Example
selectTicket(payload)