-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.js
38 lines (34 loc) · 900 Bytes
/
index.js
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
35
36
37
38
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { getNewPath } from '@woocommerce/navigation';
/**
* Internal dependencies
*/
import TopBar from '.~/components/stepper/top-bar';
import HelpIconButton from '.~/components/help-icon-button';
import { recordGlaEvent } from '.~/utils/tracks';
/**
* @fires gla_setup_mc with `{ triggered_by: 'back-button', action: 'leave' }`.
*/
const SetupMCTopBar = () => {
const handleBackButtonClick = () => {
recordGlaEvent( 'gla_setup_mc', {
triggered_by: 'back-button',
action: 'leave',
} );
};
return (
<TopBar
title={ __(
'Get started with Google for WooCommerce',
'google-listings-and-ads'
) }
helpButton={ <HelpIconButton eventContext="setup-mc" /> }
backHref={ getNewPath( {}, '/google/start' ) }
onBackButtonClick={ handleBackButtonClick }
/>
);
};
export default SetupMCTopBar;