2016-06-23 20:05:30 -07:00
|
|
|
import types from '../../common/app/redux/types';
|
2016-03-02 22:19:04 -08:00
|
|
|
|
2016-06-23 20:05:30 -07:00
|
|
|
const { hardGoTo } = types;
|
2016-06-17 22:20:20 -07:00
|
|
|
export default function hardGoToSaga(action$, getState, { history }) {
|
2016-04-24 21:54:48 -07:00
|
|
|
return action$
|
|
|
|
.filter(({ type }) => type === hardGoTo)
|
2016-06-17 22:20:20 -07:00
|
|
|
.map(({ payload = '/settings' }) => {
|
2016-06-20 11:35:19 -07:00
|
|
|
history.pushState(history.state, null, payload);
|
2016-04-24 21:54:48 -07:00
|
|
|
return null;
|
|
|
|
});
|
|
|
|
}
|