react-code-dataset / wp-calypso /client /components /data /query-jetpack-product-install-status /index.js
react-code-dataset / wp-calypso /client /components /data /query-jetpack-product-install-status /index.js
Download wp-calypso/client/components/data/query-jetpack-product-install-status/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 740 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-jetpack-product-install-status/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/data/query-jetpack-product-install-status/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-jetpack-product-install-status/index.js
740 Bytes
| import PropTypes from 'prop-types'; | |
| import { Component } from 'react'; | |
| import { connect } from 'react-redux'; | |
| import { requestJetpackProductInstallStatus } from 'calypso/state/jetpack-product-install/actions'; | |
| class QueryJetpackProductInstallStatus extends Component { | |
| static propTypes = { | |
| siteId: PropTypes.number.isRequired, | |
| }; | |
| componentDidMount() { | |
| this.props.requestJetpackProductInstallStatus( this.props.siteId ); | |
| } | |
| componentDidUpdate( prevProps ) { | |
| if ( prevProps.siteId !== this.props.siteId ) { | |
| this.props.requestJetpackProductInstallStatus( this.props.siteId ); | |
| } | |
| } | |
| render() { | |
| return null; | |
| } | |
| } | |
| export default connect( null, { | |
| requestJetpackProductInstallStatus, | |
| } )( QueryJetpackProductInstallStatus ); | |