Download wp-calypso/client/state/concierge/available-sessions/reducer.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 404 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/concierge/available-sessions/reducer.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/concierge/available-sessions/reducer.js
-
curl -L -o reducer.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/concierge/available-sessions/reducer.js
404 Bytes
| import { CONCIERGE_INITIAL_REQUEST, CONCIERGE_INITIAL_UPDATE } from 'calypso/state/action-types'; | |
| export const availableSessions = ( state = [], action ) => { | |
| switch ( action.type ) { | |
| case CONCIERGE_INITIAL_REQUEST: | |
| return []; | |
| case CONCIERGE_INITIAL_UPDATE: { | |
| const { initial } = action; | |
| return initial.availableSessions || []; | |
| } | |
| } | |
| return state; | |
| }; | |
| export default availableSessions; | |