Start adding NavBar #25
This commit is contained in:
10 files changed
+150
-5
No files matched your search
@@ -0,0 +1,24 @@
|
||||
/** @format */
|
||||
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
export const appBarSlice = createSlice({
|
||||
name: "appBar",
|
||||
initialState: {
|
||||
visible: false,
|
||||
backdrop: false,
|
||||
},
|
||||
reducers: {
|
||||
showAppBar: (state) => {
|
||||
state.visible = true;
|
||||
},
|
||||
hideAppBar: (state) => {
|
||||
state.visible = false;
|
||||
},
|
||||
setBackdrop: (state, action) => {
|
||||
state.backdrop = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { showAppBar, hideAppBar, setBackdrop } = appBarSlice.actions;
|
||||
export default appBarSlice.reducer;
|
||||
@@ -11,7 +11,7 @@ export const sideBarSlice = createSlice({
|
||||
state.visible = true;
|
||||
},
|
||||
hideSidemenu: (state) => {
|
||||
state.visible - false;
|
||||
state.visible = false;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user