main
Last change
on this file since fe03f69 was 64dc53b, checked in by anastasovv <simon@…>, 2 years ago |
Code cleanings
|
-
Property mode
set to
100644
|
File size:
2.3 KB
|
Rev | Line | |
---|
[87614a5] | 1 | import { createSlice } from '@reduxjs/toolkit';
|
---|
| 2 |
|
---|
| 3 | const initialState = {
|
---|
| 4 | style: {
|
---|
| 5 | // login
|
---|
| 6 | displayLoadingScreen: false,
|
---|
| 7 | displayRegisterScreen: false,
|
---|
| 8 | registerScreenInfo: {
|
---|
[64dc53b] | 9 | setFocus: true,
|
---|
[87614a5] | 10 | username: '',
|
---|
| 11 | displayName: '',
|
---|
| 12 | password: '',
|
---|
| 13 | },
|
---|
| 14 | displayLoginScreen: false,
|
---|
| 15 | loginScreenInfo: {
|
---|
[64dc53b] | 16 | setFocus: true,
|
---|
[87614a5] | 17 | username: '',
|
---|
| 18 | password: '',
|
---|
| 19 | },
|
---|
| 20 | // custom
|
---|
| 21 | inlineAlertText: '',
|
---|
| 22 | alert: {
|
---|
| 23 | show: false,
|
---|
| 24 | title: '',
|
---|
| 25 | subtitle: '',
|
---|
| 26 | button: {
|
---|
| 27 | text: '',
|
---|
| 28 | action: '',
|
---|
| 29 | }
|
---|
| 30 | },
|
---|
| 31 | notification: {
|
---|
| 32 | show: false,
|
---|
| 33 | text: '',
|
---|
| 34 | status: '',
|
---|
| 35 | },
|
---|
| 36 | // stats
|
---|
| 37 | displayStatsScreen: false,
|
---|
| 38 | statsScreenInfo: {
|
---|
| 39 | money: {
|
---|
| 40 | bet: 0,
|
---|
| 41 | earned: 0,
|
---|
| 42 | },
|
---|
| 43 | blackjack: {
|
---|
| 44 | games: 0,
|
---|
| 45 | wins: 0,
|
---|
| 46 | },
|
---|
| 47 | roulette: {
|
---|
| 48 | games: 0,
|
---|
| 49 | wins: 0,
|
---|
| 50 | },
|
---|
| 51 | poker: {
|
---|
| 52 | games: 0,
|
---|
| 53 | wins: 0,
|
---|
| 54 | },
|
---|
| 55 | },
|
---|
| 56 | // manage credits
|
---|
| 57 | displayManageCreditsScreen: false,
|
---|
| 58 | },
|
---|
| 59 | // blackjack
|
---|
| 60 | blackjack: {
|
---|
| 61 | displays: {
|
---|
| 62 | sideBetsChooseCreditsModal: false,
|
---|
| 63 | sideBetsModal: false,
|
---|
| 64 | initialBet: true,
|
---|
| 65 | sideBet: false,
|
---|
| 66 | hitStand: false,
|
---|
| 67 | },
|
---|
| 68 | inputControls: {
|
---|
| 69 | initialBet: {
|
---|
| 70 | chosenCredits: 0,
|
---|
| 71 | maxCredits: 0,
|
---|
| 72 | },
|
---|
| 73 | sideBet: {
|
---|
| 74 | chosenCredits: 0,
|
---|
| 75 | maxCredits: 0,
|
---|
| 76 | }
|
---|
| 77 | },
|
---|
| 78 | texts: {
|
---|
| 79 | sideBetsChooseCreditsText: '',
|
---|
| 80 | sideBetsPaysText: '',
|
---|
| 81 | }
|
---|
| 82 | }
|
---|
| 83 | }
|
---|
| 84 |
|
---|
| 85 | export const styleSlice = createSlice({
|
---|
| 86 | name: 'style',
|
---|
| 87 | initialState,
|
---|
| 88 | reducers: {
|
---|
| 89 | setStyle: (state, action) => {
|
---|
| 90 | state.style = action.payload;
|
---|
| 91 | },
|
---|
| 92 | setBlackjack: (state, action) => {
|
---|
| 93 | state.blackjack = action.payload;
|
---|
| 94 | }
|
---|
| 95 | }
|
---|
| 96 | })
|
---|
| 97 |
|
---|
| 98 | export const { setStyle, setBlackjack } = styleSlice.actions
|
---|
| 99 |
|
---|
| 100 | export default styleSlice.reducer |
---|
Note:
See
TracBrowser
for help on using the repository browser.