diff --git a/plugins/talk-plugin-featured-comments/client/reducer.js b/plugins/talk-plugin-featured-comments/client/reducer.js new file mode 100644 index 000000000..3840155b3 --- /dev/null +++ b/plugins/talk-plugin-featured-comments/client/reducer.js @@ -0,0 +1,22 @@ +import {OPEN_FEATURED_DIALOG, CLOSE_FEATURED_DIALOG} from './constants'; + +const initialState = { + showFeaturedDialog: false, +}; + +export default function reducer(state = initialState, action) { + switch (action.type) { + case OPEN_FEATURED_DIALOG: + return { + ...state, + showFeaturedDialog: true, + }; + case CLOSE_FEATURED_DIALOG: + return { + ...state, + showFeaturedDialog: false, + }; + default : + return state; + } +}