Download wp-calypso/apps/notifications/src/panel/state/suggestions/reducer.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 328 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/notifications/src/panel/state/suggestions/reducer.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/apps/notifications/src/panel/state/suggestions/reducer.js
-
curl -L -o reducer.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/notifications/src/panel/state/suggestions/reducer.js
328 Bytes
| import { combineReducers } from 'redux'; | |
| import * as types from '../action-types'; | |
| export const bySite = ( state = {}, { type, siteId, suggestions } ) => { | |
| if ( types.SUGGESTIONS_STORE === type ) { | |
| return { | |
| ...state, | |
| [ siteId ]: suggestions, | |
| }; | |
| } | |
| return state; | |
| }; | |
| export default combineReducers( { | |
| bySite, | |
| } ); | |