Download wp-calypso/client/dashboard/utils/site-name.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 432 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/utils/site-name.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/utils/site-name.ts
-
curl -L -o site-name.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/utils/site-name.ts
432 Bytes
| import { __ } from '@wordpress/i18n'; | |
| import { getSiteStatus } from './site-status'; | |
| import { getSiteDisplayUrl } from './site-url'; | |
| import type { Site } from '../data/types'; | |
| export function getSiteDisplayName( site: Site ) { | |
| const status = getSiteStatus( site ); | |
| if ( status === 'migration_pending' || status === 'migration_started' ) { | |
| return __( 'Incoming Migration' ); | |
| } | |
| return site.name || getSiteDisplayUrl( site ); | |
| } | |