File size: 404 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
const initialState = {
isOpen: false,
threadId: null,
messageId: null,
};
export default function gallery(state = initialState, action) {
switch (action.type) {
case 'SHOW_GALLERY':
return {
isOpen: true,
threadId: action.threadId,
messageId: action.messageId,
};
case 'HIDE_GALLERY':
return initialState;
default:
return state;
}
}
|