Download wp-calypso/client/mailing-lists/controller.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 311 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/mailing-lists/controller.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/mailing-lists/controller.js
-
curl -L -o controller.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/mailing-lists/controller.js
311 Bytes
| import { createElement } from 'react'; | |
| import MainComponent from './main'; | |
| export default { | |
| unsubscribe( context, next ) { | |
| const { email, category, hmac, ...rest } = context.query; | |
| context.primary = createElement( MainComponent, { | |
| email, | |
| category, | |
| hmac, | |
| context: rest, | |
| } ); | |
| next(); | |
| }, | |
| }; | |