17 lines
388 B
TypeScript
17 lines
388 B
TypeScript
import type { PayloadAction } from '@reduxjs/toolkit'
|
|
|
|
import { createSlice } from '@reduxjs/toolkit'
|
|
|
|
export const menuOpenSlice = createSlice({
|
|
name: 'menu-open',
|
|
initialState: {
|
|
value: false
|
|
},
|
|
reducers: {
|
|
set: (state, action: PayloadAction<boolean>) => {
|
|
state.value = action.payload
|
|
}
|
|
}
|
|
})
|
|
export default menuOpenSlice.reducer
|