import React, { ComponentType, ReactNode } from 'react'; import { getLocaleIconUrl } from 'app/components/i18n'; import { FormattedMessage as Message } from 'react-intl'; import styles from './languageSwitcher.scss'; import { LocaleData } from './LanguageSwitcherPopup'; interface Props { locale: LocaleData; } const LocaleItem: ComponentType = ({ locale: { code, name, englishName, progress, isReleased } }) => { let progressLabel: ReactNode; if (progress !== 100) { progressLabel = ( ); } else if (!isReleased) { progressLabel = ; } return (
{name}
{englishName} {progressLabel ? '| ' : ''} {progressLabel}
); }; export default LocaleItem;