diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-21 12:08:41 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:43 +0200 |
| commit | 1b6545fa653df44b019f6676faed39880999b2bf (patch) | |
| tree | cb131975db09cdb401b082700e2075d462495897 /src/reducers/simulations.js | |
| parent | 8a49e1eedebb6d4c47edf6fd1a7545ea502d59e7 (diff) | |
Add basic react-konva rendering prototype
Diffstat (limited to 'src/reducers/simulations.js')
| -rw-r--r-- | src/reducers/simulations.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/reducers/simulations.js b/src/reducers/simulations.js index 7d0b9d66..9bca7740 100644 --- a/src/reducers/simulations.js +++ b/src/reducers/simulations.js @@ -1,6 +1,7 @@ import { ADD_SIMULATION_SUCCEEDED, DELETE_SIMULATION_SUCCEEDED, + OPEN_SIMULATION_SUCCEEDED, SET_AUTH_VISIBILITY_FILTER } from "../actions/simulations"; import {FETCH_AUTHORIZATIONS_OF_CURRENT_USER_SUCCEEDED} from "../actions/users"; @@ -29,3 +30,12 @@ export function authVisibilityFilter(state = "SHOW_ALL", action) { return state; } } + +export function currentSimulationId(state = -1, action) { + switch (action.type) { + case OPEN_SIMULATION_SUCCEEDED: + return action.id; + default: + return state; + } +} |
