Download wp-calypso/client/my-sites/pages/controller.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 373 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/pages/controller.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/my-sites/pages/controller.js
-
curl -L -o controller.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/pages/controller.js
373 Bytes
| import { getCurrentUserId } from 'calypso/state/current-user/selectors'; | |
| import Pages from './main'; | |
| export function pages( context, next ) { | |
| const author = | |
| context.params.author === 'my' ? getCurrentUserId( context.store.getState() ) : null; | |
| context.primary = ( | |
| <Pages status={ context.params.status } search={ context.query.s } author={ author } /> | |
| ); | |
| next(); | |
| } | |