main
Last change
on this file since e903234 was e903234, checked in by anastasovv <simon@…>, 2 years ago |
Added an admin panel, and the admin can now answer complaints
|
-
Property mode
set to
100644
|
File size:
660 bytes
|
Rev | Line | |
---|
[e903234] | 1 | import { createSlice } from '@reduxjs/toolkit';
|
---|
| 2 |
|
---|
| 3 | const initialState = {
|
---|
| 4 | adminInformation: {
|
---|
| 5 | complaints: [],
|
---|
| 6 | answeringComplaintIndex: -1,
|
---|
| 7 | answerForComplaint: '',
|
---|
| 8 | liveGames: {
|
---|
| 9 | blackjack: [],
|
---|
| 10 | roulette: [],
|
---|
| 11 | poker: [],
|
---|
| 12 | },
|
---|
| 13 | },
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | export const adminInformationSlice = createSlice({
|
---|
| 17 | name: 'adminInformation',
|
---|
| 18 | initialState,
|
---|
| 19 | reducers: {
|
---|
| 20 | setAdminInformation: (state, action) => {
|
---|
| 21 | state.adminInformation = action.payload;
|
---|
| 22 | },
|
---|
| 23 | }
|
---|
| 24 | })
|
---|
| 25 |
|
---|
| 26 | export const { setAdminInformation } = adminInformationSlice.actions
|
---|
| 27 |
|
---|
| 28 | export default adminInformationSlice.reducer |
---|
Note:
See
TracBrowser
for help on using the repository browser.