mirror of
https://dev.azure.com/tstanciu94/CDN/_git/CDN_Frontend
synced 2025-06-21 19:24:34 +03:00
small change
This commit is contained in:
parent
34f455ded2
commit
7e19f387e5
@ -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"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user