Download wp-calypso/client/data/p2/with-p2-guests.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 375 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/p2/with-p2-guests.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/p2/with-p2-guests.js
-
curl -L -o with-p2-guests.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/p2/with-p2-guests.js
375 Bytes
| import { createHigherOrderComponent } from '@wordpress/compose'; | |
| import useP2GuestsQuery from 'calypso/data/p2/use-p2-guests-query'; | |
| const withP2Guests = createHigherOrderComponent( | |
| ( Wrapped ) => ( props ) => { | |
| const { data } = useP2GuestsQuery( props.site?.ID ); | |
| return <Wrapped { ...props } p2Guests={ data } />; | |
| }, | |
| 'withP2Guests' | |
| ); | |
| export default withP2Guests; | |