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