You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reducer.ts 547B

1234567891011121314151617181920212223
  1. import ReducerRegistry from '../base/redux/ReducerRegistry';
  2. import { TOGGLE_SHARE_DIALOG } from './actionTypes';
  3. const DEFAULT_STATE = {
  4. shareDialogVisible: false
  5. };
  6. export interface IShareRoomState {
  7. shareDialogVisible: boolean;
  8. }
  9. ReducerRegistry.register<IShareRoomState>('features/share-room', (state = DEFAULT_STATE, action): IShareRoomState => {
  10. switch (action.type) {
  11. case TOGGLE_SHARE_DIALOG:
  12. return {
  13. ...state,
  14. shareDialogVisible: action.visible
  15. };
  16. }
  17. return state;
  18. });