mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
318c35c2cb
* Some minor implementations * Some more * Lots more * Removed 'backend' alias * removed all promises * Removed a bunch of module exports stuff * Some morE' * Fix * custom DNS * Tests for DNS * bug fix * Some small adjustments * Small stuff
32 lines
520 B
JavaScript
32 lines
520 B
JavaScript
import {combineReducers} from 'redux';
|
|
|
|
export const WORKSPACE_ACTIVATE = 'workspaces/activate';
|
|
|
|
// ~~~~~~~~ //
|
|
// REDUCERS //
|
|
// ~~~~~~~~ //
|
|
|
|
function activeReducer (state = null, action) {
|
|
switch (action.type) {
|
|
|
|
case WORKSPACE_ACTIVATE:
|
|
return action.workspace._id;
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
}
|
|
|
|
export default combineReducers({
|
|
activeId: activeReducer
|
|
});
|
|
|
|
|
|
// ~~~~~~~ //
|
|
// ACTIONS //
|
|
// ~~~~~~~ //
|
|
|
|
export function activate (workspace) {
|
|
return {type: WORKSPACE_ACTIVATE, workspace};
|
|
}
|