mirror of
https://github.com/wassname/talk.git
synced 2026-07-16 11:22:16 +08:00
23 lines
451 B
JavaScript
23 lines
451 B
JavaScript
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;
|
|
}
|
|
}
|