source: redux/reducers/adminSlice.js@ 41d3f60

main
Last change on this file since 41d3f60 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: 678 bytes
RevLine 
[e903234]1import { createSlice } from '@reduxjs/toolkit';
2
3const initialState = {
4 admin: {
5 session_id: '',
6 inputControls: {
7 username: '',
8 password: '',
9 },
10 displays: {
11 setFocus: true,
12 complaintsScreen: false,
13 liveGamesScreen: false,
14 loadingScreen: false,
15 },
16 inlineAlertText: '',
17 },
18}
19
20export const adminSlice = createSlice({
21 name: 'admin',
22 initialState,
23 reducers: {
24 setAdmin: (state, action) => {
25 state.admin = action.payload;
26 },
27 }
28})
29
30export const { setAdmin } = adminSlice.actions
31
32export default adminSlice.reducer
Note: See TracBrowser for help on using the repository browser.