react-code-dataset / spectrum /src /reducers /threadSlider.js
Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
396 Bytes
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;
}
}