Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Drawer from 'react-md/lib/Drawers';
import { LAYOUTS } from '../../../../core/constants';
import * as t from '../../actionTypes';
export const STATE_KEY = 'ui';
function updateDrawerType(state, { drawerType }) {
if (state.customDrawerType === drawerType) {
return state;
}
return Object.assign({}, state, { customDrawerType: drawerType });
}
const { mobile, tablet, desktop } = Drawer.getCurrentMedia();
let defaultMedia = 'mobile';
if (desktop) {
defaultMedia = 'desktop';
} else if (tablet) {
defaultMedia = 'tablet';
}
const INITIAL_STATE = {
loaded: false,
layout: LAYOUTS.GRID,
modal: false,
drawer: false,
isMobile: false,
mobile,
tablet,
desktop,