File size: 641 Bytes
6e81cb0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import { createSlice } from '@reduxjs/toolkit';
const initialState = {
theme: 'dark-professional',
layout: 'multi-pane',
notifications: [],
soundEnabled: true,
accessibility: { highContrast: false, reducedMotion: false }
};
export const appSlice = createSlice({
name: 'app',
initialState,
reducers: {
setTheme: (state, action) => {
state.theme = action.payload;
},
updateNotifications: (state, action) => {
state.notifications = [action.payload, ...state.notifications.slice(0, 4)];
},
},
});
export const { setTheme, updateNotifications } = appSlice.actions;
export default appSlice.reducer; |