diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-20 14:09:39 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-20 14:09:39 +0200 |
| commit | 6e3ad713111f35fc58bd2b7f1be5aeeb57eb94a8 (patch) | |
| tree | bcd0466cae9792be5d594ca821d54e843b006423 /opendc-web/opendc-web-ui/src/data/topology.js | |
| parent | 51c759e74b088d405b63fdb3e374822308d21366 (diff) | |
refactor(ui): Perform Saga mutations through React Query
This change updates the OpenDC frontend to perform mutations of the
topology done in Sagas through the React Query cache, so that non-Saga
parts of the application also have their topology queries updated.
Diffstat (limited to 'opendc-web/opendc-web-ui/src/data/topology.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/data/topology.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-web/opendc-web-ui/src/data/topology.js b/opendc-web/opendc-web-ui/src/data/topology.js index bd4d1e4d..83abb6aa 100644 --- a/opendc-web/opendc-web-ui/src/data/topology.js +++ b/opendc-web/opendc-web-ui/src/data/topology.js @@ -46,7 +46,7 @@ export function configureTopologyClient(queryClient, auth) { }) queryClient.setMutationDefaults('updateTopology', { mutationFn: (data) => updateTopology(auth, data), - onSuccess: async (result) => queryClient.setQueryData(['topologies', result._id], result), + onSuccess: (result) => queryClient.setQueryData(['topologies', result._id], result), }) queryClient.setMutationDefaults('deleteTopology', { mutationFn: (id) => deleteTopology(auth, id), |
