Download wp-calypso/client/lib/domains/get-current-user-cannot-add-email-reason.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 352 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/get-current-user-cannot-add-email-reason.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/domains/get-current-user-cannot-add-email-reason.ts
-
curl -L -o get-current-user-cannot-add-email-reason.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/get-current-user-cannot-add-email-reason.ts
352 Bytes
| import { canCurrentUserAddEmail } from './can-current-user-add-email'; | |
| import type { ResponseDomain } from 'calypso/lib/domains/types'; | |
| export function getCurrentUserCannotAddEmailReason( domain: ResponseDomain | undefined ) { | |
| if ( domain && ! canCurrentUserAddEmail( domain ) ) { | |
| return domain.currentUserCannotAddEmailReason; | |
| } | |
| return null; | |
| } | |