]> cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/reducers/modal.js
Improve eslint rules (#3147)
[mastodon.git] / app / javascript / mastodon / reducers / modal.js
1 import { MODAL_OPEN, MODAL_CLOSE } from '../actions/modal';
2 import Immutable from 'immutable';
3
4 const initialState = {
5 modalType: null,
6 modalProps: {},
7 };
8
9 export default function modal(state = initialState, action) {
10 switch(action.type) {
11 case MODAL_OPEN:
12 return { modalType: action.modalType, modalProps: action.modalProps };
13 case MODAL_CLOSE:
14 return initialState;
15 default:
16 return state;
17 }
18 };
This page took 0.106713 seconds and 4 git commands to generate.