Download wp-calypso/client/data/block-editor/with-block-editor-nux-status-query.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 601 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/block-editor/with-block-editor-nux-status-query.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/block-editor/with-block-editor-nux-status-query.js
-
curl -L -o with-block-editor-nux-status-query.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/block-editor/with-block-editor-nux-status-query.js
601 Bytes
| import { createHigherOrderComponent } from '@wordpress/compose'; | |
| import { useSelector } from 'react-redux'; | |
| import { getSelectedSiteId } from 'calypso/state/ui/selectors'; | |
| import { useBlockEditorNuxStatusQuery } from './use-block-editor-nux-status-query'; | |
| const withBlockEditorNuxStatus = createHigherOrderComponent( | |
| ( Wrapped ) => ( props ) => { | |
| const siteId = useSelector( getSelectedSiteId ); | |
| const { data } = useBlockEditorNuxStatusQuery( siteId ); | |
| return <Wrapped { ...props } blockEditorNuxStatus={ data } />; | |
| }, | |
| 'withBlockEditorNuxStatus' | |
| ); | |
| export default withBlockEditorNuxStatus; | |