Skip to content

Commit

Permalink
Refactor redux store
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Nov 19, 2022
1 parent 5a13352 commit 0b936aa
Show file tree
Hide file tree
Showing 19 changed files with 251 additions and 243 deletions.
194 changes: 11 additions & 183 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -22,13 +22,13 @@
"jquery": "^3.6.0",
"js-cookie": "^2.2.1",
"local-storage": "^2.0.0",
"lodash": "^4.17.21",
"popper.js": "^1.16.1",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-bootstrap": "^1.5.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"redux": "^4.1.1",
"redux-thunk": "^2.3.0"
},
Expand Down
6 changes: 6 additions & 0 deletions rdmo/management/assets/js/actions/configActions.js
@@ -0,0 +1,6 @@
export function updateConfig(config) {
return {type: 'config/updateConfig', config}
}
export function updateConfigAndLocation(config) {
return {type: 'config/updateConfigAndLocation', config}
}
15 changes: 15 additions & 0 deletions rdmo/management/assets/js/actions/elementActions.js
@@ -0,0 +1,15 @@
import QuestionsApi from '../api/QuestionsApi'

export function fetchCatalogsSuccess(catalogs) {
return {type: 'elements/fetchCatalogsSuccess', catalogs}
}

export function fetchCatalogs() {
return function(dispatch) {
return QuestionsApi.fetchCatalogs().then(catalogs => {
dispatch(fetchCatalogsSuccess(catalogs))
}).catch(error => {
throw(error)
})
}
}
15 changes: 0 additions & 15 deletions rdmo/management/assets/js/actions/questionsActions.js

This file was deleted.

0 comments on commit 0b936aa

Please sign in to comment.