Download wp-calypso/client/state/guided-tours/reducer.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 487 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/guided-tours/reducer.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/guided-tours/reducer.js
-
curl -L -o reducer.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/guided-tours/reducer.js
487 Bytes
| import { withStorageKey } from '@automattic/state-utils'; | |
| import { | |
| GUIDED_TOUR_UPDATE, | |
| GUIDED_TOUR_PAUSE, | |
| GUIDED_TOUR_RESUME, | |
| } from 'calypso/state/action-types'; | |
| export function guidedTours( state = {}, action ) { | |
| switch ( action.type ) { | |
| case GUIDED_TOUR_UPDATE: | |
| case GUIDED_TOUR_PAUSE: | |
| case GUIDED_TOUR_RESUME: { | |
| const { type, ...update } = action; | |
| return { ...state, ...update }; | |
| } | |
| } | |
| return state; | |
| } | |
| export default withStorageKey( 'guidedTours', guidedTours ); | |