small change

master
Tudor Stanciu 2021-07-29 20:09:45 +03:00
parent 34f455ded2
commit 7e19f387e5
1 changed files with 2 additions and 3 deletions

View File

@ -15,7 +15,7 @@ function layoutReducer(state, action) {
function LayoutProvider({ children }) { function LayoutProvider({ children }) {
var [state, dispatch] = React.useReducer(layoutReducer, { var [state, dispatch] = React.useReducer(layoutReducer, {
isSidebarOpened: true, isSidebarOpened: true
}); });
return ( return (
<LayoutStateContext.Provider value={state}> <LayoutStateContext.Provider value={state}>
@ -44,9 +44,8 @@ function useLayoutDispatch() {
export { LayoutProvider, useLayoutState, useLayoutDispatch, toggleSidebar }; export { LayoutProvider, useLayoutState, useLayoutDispatch, toggleSidebar };
// ###########################################################
function toggleSidebar(dispatch) { function toggleSidebar(dispatch) {
dispatch({ dispatch({
type: "TOGGLE_SIDEBAR", type: "TOGGLE_SIDEBAR"
}); });
} }