From 9c8a987556d0fb0cdf0eb67e0c191a8dcc5593b9 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 7 Jul 2021 17:30:15 +0200 Subject: ui: Fetch scenarios and portfolios using React Query --- opendc-web/opendc-web-ui/src/redux/sagas/projects.js | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'opendc-web/opendc-web-ui/src/redux/sagas/projects.js') 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) } -- cgit v1.2.3