2018-02-08 12:01:06 +01:00
|
|
|
// import { LOCATION_CHANGE } from 'react-router-redux';
|
2018-02-15 17:46:57 +01:00
|
|
|
import { fork, select, takeLatest } from 'redux-saga/effects';
|
|
|
|
|
|
|
|
import { ON_SEARCH } from './constants';
|
|
|
|
import { makeSelectSearch } from './selectors';
|
|
|
|
|
|
|
|
function* search() {
|
|
|
|
try {
|
|
|
|
const search = yield select(makeSelectSearch());
|
|
|
|
console.log('will search', search);
|
|
|
|
} catch(err) {
|
|
|
|
console.log(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-08 12:01:06 +01:00
|
|
|
|
|
|
|
// Individual exports for testing
|
|
|
|
export function* defaultSaga() {
|
2018-02-15 17:46:57 +01:00
|
|
|
yield fork(takeLatest, ON_SEARCH, search);
|
2018-02-08 12:01:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// All sagas to be loaded
|
|
|
|
export default defaultSaga;
|