Download client/src/reducers/recvFile.js from linuxrun/deer: direct link, hf CLI and curl.
- Browser
- Download file 425 Bytes
-
https://huggingface.co/spaces/linuxrun/deer/resolve/main/client/src/reducers/recvFile.js
- Command line
-
hf download hf://spaces/linuxrun/deer/client/src/reducers/recvFile.js
-
curl -L -o recvFile.js https://huggingface.co/spaces/linuxrun/deer/resolve/main/client/src/reducers/recvFile.js
425 Bytes
| import produce from 'immer'; | |
| import * as types from '../common/actionTypes'; | |
| const initialState = { | |
| targetId: '', | |
| files: [], | |
| }; | |
| const fileReducer = produce((draft = initialState, action) => { | |
| switch (action.type) { | |
| case types.UPDATE_RECV_FILE_INFO: { | |
| draft.targetId = action.payload.clientId; | |
| draft.files = action.payload.files; | |
| break; | |
| } | |
| } | |
| return draft; | |
| }); | |
| export default fileReducer; | |