Download wp-calypso/client/data/media/with-add-media.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 314 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/media/with-add-media.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/media/with-add-media.js
-
curl -L -o with-add-media.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/media/with-add-media.js
314 Bytes
| import { createHigherOrderComponent } from '@wordpress/compose'; | |
| import { useAddMedia } from './use-add-media'; | |
| export const withAddMedia = createHigherOrderComponent( | |
| ( Wrapped ) => ( props ) => { | |
| const addMedia = useAddMedia(); | |
| return <Wrapped { ...props } addMedia={ addMedia } />; | |
| }, | |
| 'WithAddMedia' | |
| ); | |