Spaces:
Running
Running
File size: 654 Bytes
f2bee8a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
const SET_ID = 'scratch-gui/connection-modal/setId';
const initialState = {
extensionId: null
};
const reducer = function (state, action) {
if (typeof state === 'undefined') state = initialState;
switch (action.type) {
case SET_ID:
return Object.assign({}, state, {
extensionId: action.extensionId
});
default:
return state;
}
};
const setConnectionModalExtensionId = function (extensionId) {
return {
type: SET_ID,
extensionId: extensionId
};
};
export {
reducer as default,
initialState as connectionModalInitialState,
setConnectionModalExtensionId
};
|