Use new <Badge /> element in email statistic panel

[MAILPOET-5091]
This commit is contained in:
David Remer
2023-07-03 13:56:25 +03:00
committed by Aschepikov
parent 0490a2b9a8
commit b566959c4a

View File

@@ -7,6 +7,7 @@ import { EmailStats, OverviewSection, storeName } from '../../../../../store';
import { locale } from '../../../../../config'; import { locale } from '../../../../../config';
import { formattedPrice } from '../../../../../formatter'; import { formattedPrice } from '../../../../../formatter';
import { openTab } from '../../../../../navigation/open_tab'; import { openTab } from '../../../../../navigation/open_tab';
import { Badge } from '../../../../email_click_badge';
type SendEmailPanelSectionProps = { type SendEmailPanelSectionProps = {
label: string; label: string;
@@ -85,9 +86,7 @@ export function SendEmailPanel({ step }: SendEmailPanelProps): JSX.Element {
/> />
<SendEmailPanelSection <SendEmailPanelSection
label={__('Clicked', 'mailpoet')} label={__('Clicked', 'mailpoet')}
value={Intl.NumberFormat(locale.toString(), { value={<Badge email={email} property="clicked" />}
notation: 'compact',
}).format(email?.clicked ?? 0)}
isLoading={isLoading} isLoading={isLoading}
/> />
<hr /> <hr />