From 9bfd652ff2c0bb5c0fa1fbce49e948bd4effa7b8 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Wed, 16 Aug 2017 23:10:32 +0300 Subject: Connect simulation remove to API --- src/reducers/simulations.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/reducers') 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; } -- cgit v1.2.3