small change
parent
34f455ded2
commit
7e19f387e5
|
@ -15,7 +15,7 @@ function layoutReducer(state, action) {
|
|||
|
||||
function LayoutProvider({ children }) {
|
||||
var [state, dispatch] = React.useReducer(layoutReducer, {
|
||||
isSidebarOpened: true,
|
||||
isSidebarOpened: true
|
||||
});
|
||||
return (
|
||||
<LayoutStateContext.Provider value={state}>
|
||||
|
@ -44,9 +44,8 @@ function useLayoutDispatch() {
|
|||
|
||||
export { LayoutProvider, useLayoutState, useLayoutDispatch, toggleSidebar };
|
||||
|
||||
// ###########################################################
|
||||
function toggleSidebar(dispatch) {
|
||||
dispatch({
|
||||
type: "TOGGLE_SIDEBAR",
|
||||
type: "TOGGLE_SIDEBAR"
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue