Start adding NavBar #25

This commit is contained in:
prayag17 committed 2023-04-01 14:18:47 +05:30
1 parent f12d92f42c
commit d6c7c29b46
10 files changed
+150 -5

No files matched your search

+24
View File
@@ -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;