fix: close drawer on back button press

This commit is contained in:
satyajit.happy
2019-11-02 08:52:12 +01:00
parent e6a06ac56e
commit 3a4c38bb72

View File

@@ -152,6 +152,16 @@ export default function DrawerRouter(
action
);
case 'GO_BACK':
if (state.isDrawerOpen) {
return {
...state,
isDrawerOpen: false,
};
}
return router.getStateForAction(state, action);
default:
return router.getStateForAction(state, action);
}