Move Video challenges under challenges dir

Remove old hikes components
Remove unused jobs stuff
This commit is contained in:
Berkeley Martinez
2016-06-13 12:26:30 -07:00
parent 5f5f9e526e
commit 4a043e151e
49 changed files with 391 additions and 2484 deletions

View File

@@ -1,6 +1,5 @@
import errSaga from './err-saga';
import titleSaga from './title-saga';
import localStorageSaga from './local-storage-saga';
import hardGoToSaga from './hard-go-to-saga';
import windowSaga from './window-saga';
import executeChallengeSaga from './execute-challenge-saga';
@@ -11,7 +10,6 @@ import gitterSaga from './gitter-saga';
export default [
errSaga,
titleSaga,
localStorageSaga,
hardGoToSaga,
windowSaga,
executeChallengeSaga,

View File

@@ -1,43 +0,0 @@
import store from 'store';
import {
saveForm,
clearForm,
loadSavedForm
} from '../../common/app/routes/Jobs/redux/types';
import {
saveCompleted,
loadSavedFormCompleted
} from '../../common/app/routes/Jobs/redux/actions';
const formKey = 'newJob';
export default function localStorageSaga(action$) {
return action$
.filter(action => {
return action.type === saveForm ||
action.type === clearForm ||
action.type === loadSavedForm;
})
.map(action => {
if (action.type === saveForm) {
const form = action.payload;
try {
store.setItem(formKey, form);
return saveCompleted(form);
} catch (error) {
return {
type: 'app.handleError',
error
};
}
}
if (action.type === clearForm) {
store.removeItem(formKey);
return null;
}
return loadSavedFormCompleted(store.getItem(formKey));
});
}