gab-social/app/javascript/gabsocial/reducers/sidebar.js

13 lines
291 B
JavaScript
Raw Normal View History

2019-08-15 04:04:03 +01:00
import { SIDEBAR_OPEN, SIDEBAR_CLOSE } from '../actions/sidebar';
export default function sidebar(state={}, action) {
switch(action.type) {
case SIDEBAR_OPEN:
return { sidebarOpen: true };
case SIDEBAR_CLOSE:
return { sidebarOpen: false };
default:
return state;
}
};