Download wp-calypso/client/components/data/query-atat-eligibility/index.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 535 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-atat-eligibility/index.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/data/query-atat-eligibility/index.jsx
-
curl -L -o index.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-atat-eligibility/index.jsx
535 Bytes
| import PropTypes from 'prop-types'; | |
| import { useEffect } from 'react'; | |
| import { useDispatch } from 'react-redux'; | |
| import { requestEligibility } from 'calypso/state/automated-transfer/actions'; | |
| function QueryAutomatedTransferEligibility( { siteId } ) { | |
| const dispatch = useDispatch(); | |
| useEffect( () => { | |
| siteId && dispatch( requestEligibility( siteId ) ); | |
| }, [ siteId, dispatch ] ); | |
| return null; | |
| } | |
| QueryAutomatedTransferEligibility.propTypes = { | |
| siteId: PropTypes.number, | |
| }; | |
| export default QueryAutomatedTransferEligibility; | |