File size: 787 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { link } from '@wordpress/icons';
import { useTranslate } from 'i18n-calypso';
import React from 'react';
import EmptyStateAction from 'calypso/my-sites/stats/components/empty-state-action';

type StatsEmptyActionUTMBuilderProps = {
	from: string;
	onClick: () => void;
};

const StatsEmptyActionUTMBuilder: React.FC< StatsEmptyActionUTMBuilderProps > = ( {
	from,
	onClick,
} ) => {
	const translate = useTranslate();
	return (
		<EmptyStateAction
			icon={ link }
			text={ translate( 'Generate URL with codes using our builder' ) }
			analyticsDetails={ {
				from: from,
				feature: 'utm_builder',
			} }
			onClick={ () => {
				// analytics event tracting handled in EmptyStateAction component

				onClick();
			} }
		/>
	);
};

export default StatsEmptyActionUTMBuilder;