jeffvli
3 years ago
committed by
Jeff
4 changed files with 41 additions and 8 deletions
@ -0,0 +1,22 @@ |
|||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; |
|||
|
|||
export interface FolderSelection { |
|||
id?: string; |
|||
} |
|||
|
|||
const initialState: FolderSelection = { |
|||
id: undefined, |
|||
}; |
|||
|
|||
const folderSlice = createSlice({ |
|||
name: 'folder', |
|||
initialState, |
|||
reducers: { |
|||
setFolder: (state, action: PayloadAction<FolderSelection>) => { |
|||
state.id = action.payload.id; |
|||
}, |
|||
}, |
|||
}); |
|||
|
|||
export const { setFolder } = folderSlice.actions; |
|||
export default folderSlice.reducer; |
Loading…
Reference in new issue