-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
127 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { createSlice } from '@reduxjs/toolkit' | ||
|
||
const initialState = { | ||
theamInfo: {theam: 'light'}, | ||
} | ||
|
||
const theamSlice = createSlice({ | ||
name: 'theam', | ||
initialState, | ||
reducers: { | ||
addNewTheam: (state, action) => { | ||
state.theamInfo = action.payload | ||
}, | ||
removeTheam: (state) => { | ||
state.theamInfo = {theam: 'light'} | ||
}, | ||
updateTheam: (state, action) => { | ||
state.theamInfo = action.payload | ||
} | ||
}, | ||
}) | ||
|
||
|
||
// // Action creators are generated for each case reducer function | ||
export const { addNewTheam, removeTheam, updateTheam } = theamSlice.actions | ||
|
||
export default theamSlice.reducer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters