import { WordPressLogo } from '@automattic/components';
import { Button } from '@wordpress/components';
import { Icon, external } from '@wordpress/icons';
import { useTranslate } from 'i18n-calypso';
import pressableIcon from 'calypso/assets/images/pressable/pressable-icon.svg';
import DocumentHead from 'calypso/components/data/document-head';
import { Site } from '../../types';
import './style.scss';
type Props = {
site: Site;
};
const HostingOverviewPreview = ( { site }: Props ) => {
const translate = useTranslate();
const formatHostingProviderName = ( hostProviderGuess: string ) => {
if ( ! hostProviderGuess ) {
return translate( 'Unknown' );
}
if ( hostProviderGuess.toLowerCase() === 'automattic' ) {
return (
<>
Pressable
>
);
}
// Currently we are only converting the name from 'snake_case' and 'kebab-case' to 'Title Case'
const formattedName = hostProviderGuess
.replace( /[-_]/g, ' ' )
.split( ' ' )
.map( ( word ) => word.charAt( 0 ).toUpperCase() + word.slice( 1 ) )
.join( ' ' );
return formattedName;
};
return (
<>