Download wp-calypso/client/state/imports/selectors.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 690 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/imports/selectors.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/imports/selectors.js
-
curl -L -o selectors.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/imports/selectors.js
690 Bytes
| import { createSelector } from '@automattic/state-utils'; | |
| import 'calypso/state/imports/init'; | |
| export function isImporterLocked( state, importerId ) { | |
| return state.imports.importerLocks[ importerId ] ?? false; | |
| } | |
| export function isImporterStatusHydrated( state ) { | |
| return state.imports.isImporterStatusHydrated; | |
| } | |
| export function getImporterStatus( state, importerId ) { | |
| return state.imports.importerStatus[ importerId ] ?? null; | |
| } | |
| export const getImporterStatusForSiteId = createSelector( | |
| ( state, siteId ) => { | |
| return Object.values( state.imports.importerStatus ).filter( | |
| ( importer ) => importer.site.ID === siteId | |
| ); | |
| }, | |
| ( state ) => [ state.imports.importerStatus ] | |
| ); | |