2021-03-03 14:37:38 +00:00
|
|
|
// @flow
|
|
|
|
|
2018-03-07 00:28:19 +00:00
|
|
|
import { ReducerRegistry } from '../base/redux';
|
|
|
|
|
2021-03-03 14:37:38 +00:00
|
|
|
import { SET_SHARED_VIDEO_STATUS, SET_DISABLE_BUTTON } from './actionTypes';
|
2018-03-07 00:28:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Reduces the Redux actions of the feature features/shared-video.
|
|
|
|
*/
|
|
|
|
ReducerRegistry.register('features/shared-video', (state = {}, action) => {
|
2021-03-03 14:37:38 +00:00
|
|
|
const { status, disabled } = action;
|
|
|
|
|
2018-03-07 00:28:19 +00:00
|
|
|
switch (action.type) {
|
|
|
|
case SET_SHARED_VIDEO_STATUS:
|
|
|
|
return {
|
|
|
|
...state,
|
2021-03-03 14:37:38 +00:00
|
|
|
status
|
|
|
|
};
|
|
|
|
|
|
|
|
case SET_DISABLE_BUTTON:
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
disabled
|
2018-03-07 00:28:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
});
|