Download wp-calypso/client/state/selectors/get-backup-progress.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/selectors/get-backup-progress.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/selectors/get-backup-progress.js
-
curl -L -o get-backup-progress.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/selectors/get-backup-progress.js
406 Bytes
| import { get } from 'lodash'; | |
| import 'calypso/state/activity-log/init'; | |
| /** | |
| * Returns the progress of a backup request | |
| * @param {Object} state Global state tree | |
| * @param {?number|string} siteId the site ID | |
| * @returns {?Object} Progress object, null if no data | |
| */ | |
| export default function getBackupProgress( state, siteId ) { | |
| return get( state, [ 'activityLog', 'backupProgress', siteId ], null ); | |
| } | |