diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-16 23:10:32 +0300 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:43 +0200 |
| commit | 9bfd652ff2c0bb5c0fa1fbce49e948bd4effa7b8 (patch) | |
| tree | 3a19dd6bd49d3022a37e84bda1ad50cd8e2fbc97 /src/reducers | |
| parent | 07195f3762b6a8a7dfb44c2231db58c5be13c43f (diff) | |
Connect simulation remove to API
Diffstat (limited to 'src/reducers')
| -rw-r--r-- | src/reducers/simulations.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reducers/simulations.js b/src/reducers/simulations.js index 5a34ee7f..9d830877 100644 --- a/src/reducers/simulations.js +++ b/src/reducers/simulations.js @@ -1,7 +1,7 @@ import { ADD_SIMULATION_SUCCEEDED, CLOSE_NEW_SIMULATION_MODAL, - DELETE_SIMULATION, + DELETE_SIMULATION_SUCCEEDED, OPEN_NEW_SIMULATION_MODAL, SET_AUTH_VISIBILITY_FILTER } from "../actions/simulations"; @@ -16,8 +16,8 @@ export function authorizationsOfCurrentUser(state = [], action) { ...state, action.authorization ]; - case DELETE_SIMULATION: - return []; + case DELETE_SIMULATION_SUCCEEDED: + return state.filter(authorization => authorization[1] !== action.id); default: return state; } |
