Download wp-calypso/client/state/ui/section/reducer.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 304 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/section/reducer.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/ui/section/reducer.js
-
curl -L -o reducer.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/section/reducer.js
304 Bytes
| import { SECTION_SET } from 'calypso/state/action-types'; | |
| //TODO: do we really want to mix strings and booleans? | |
| export default function section( state = false, action ) { | |
| switch ( action.type ) { | |
| case SECTION_SET: | |
| return action.section !== undefined ? action.section : state; | |
| } | |
| return state; | |
| } | |