logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

modal.js (386B)


  1. import { MODAL_OPEN, MODAL_CLOSE } from '../actions/modal';
  2. const initialState = {
  3. modalType: null,
  4. modalProps: {},
  5. };
  6. export default function modal(state = initialState, action) {
  7. switch(action.type) {
  8. case MODAL_OPEN:
  9. return { modalType: action.modalType, modalProps: action.modalProps };
  10. case MODAL_CLOSE:
  11. return initialState;
  12. default:
  13. return state;
  14. }
  15. };