Skip to content

Commit 31f97b4

Browse files
author
gondzo
committed
add redirect on drone save/update
1 parent 373ad96 commit 31f97b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/EditDrones/modules/EditDrones.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ export const save = (values) => async (dispatch, getState) => {
7575
drone = _.pick(drone, [..._.keys(defaultDrone), 'id']);
7676
dispatch({type: UPDATED, payload: {drone}});
7777
toastr.success('Drone saved');
78+
dispatch(push('/my-drone'));
7879
} else {
7980
drone = await APIService.createProviderDrone(drone);
80-
dispatch(push(`/edit-drones/${drone.id}`));
8181
toastr.success('Drone created');
82+
dispatch(push('/my-drone'));
8283
}
8384
};
8485

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy