Download wp-calypso/client/lib/domains/utils/can-set-as-primary.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 374 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/utils/can-set-as-primary.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/domains/utils/can-set-as-primary.ts
-
curl -L -o can-set-as-primary.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/utils/can-set-as-primary.ts
374 Bytes
| import type { ResponseDomain } from 'calypso/lib/domains/types'; | |
| export function canSetAsPrimary( | |
| domain: ResponseDomain, | |
| isManagingAllSites: boolean, | |
| shouldUpgradeToMakePrimary: boolean | |
| ): boolean { | |
| return ( | |
| ! isManagingAllSites && | |
| domain && | |
| domain.canSetAsPrimary && | |
| ! domain.isPrimary && | |
| ! shouldUpgradeToMakePrimary && | |
| ! domain.aftermarketAuction | |
| ); | |
| } | |