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