diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-07 17:30:15 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-07 17:39:43 +0200 |
| commit | 9c8a987556d0fb0cdf0eb67e0c191a8dcc5593b9 (patch) | |
| tree | 617c184a6d2868aec6efc29f1c8dea1b19a00598 /opendc-web/opendc-web-ui/src/redux/sagas/projects.js | |
| parent | d28a2f194a75eb86095485ae4f88be349bcc18b6 (diff) | |
ui: Fetch scenarios and portfolios using React Query
Diffstat (limited to 'opendc-web/opendc-web-ui/src/redux/sagas/projects.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/redux/sagas/projects.js | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/opendc-web/opendc-web-ui/src/redux/sagas/projects.js b/opendc-web/opendc-web-ui/src/redux/sagas/projects.js index 6dc3c682..5809d4d2 100644 --- a/opendc-web/opendc-web-ui/src/redux/sagas/projects.js +++ b/opendc-web/opendc-web-ui/src/redux/sagas/projects.js @@ -1,18 +1,8 @@ -import { call, getContext } from 'redux-saga/effects' import { fetchAndStoreAllTopologiesOfProject } from './topology' -import { fetchPortfoliosOfProject } from './portfolios' -import { fetchProject } from '../../api/projects' export function* onOpenProjectSucceeded(action) { try { - const auth = yield getContext('auth') - const queryClient = yield getContext('queryClient') - const project = yield call(() => - queryClient.fetchQuery(`projects/${action.id}`, () => fetchProject(auth, action.id)) - ) - yield fetchAndStoreAllTopologiesOfProject(action.id, true) - yield fetchPortfoliosOfProject(project) } catch (error) { console.error(error) } |
