This commit is contained in:
mgabdev
2020-05-14 02:03:22 -04:00
parent ef880dec76
commit 4acc21944c
26 changed files with 452 additions and 69 deletions

View File

@@ -1,12 +1,19 @@
import { SIDEBAR_OPEN, SIDEBAR_CLOSE } from '../actions/sidebar';
import {
SIDEBAR_OPEN,
SIDEBAR_CLOSE,
} from '../actions/sidebar'
export default function sidebar(state={}, action) {
const initialState = {
open: false,
}
export default function sidebar(state = initialState, action) {
switch(action.type) {
case SIDEBAR_OPEN:
return { sidebarOpen: true };
return { open: true }
case SIDEBAR_CLOSE:
return { sidebarOpen: false };
return { open: false }
default:
return state;
return state
}
};
}