2021-11-02 17:33:42 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { __ } from '@wordpress/i18n';
|
|
|
|
import { recordEvent, queueRecordEvent } from '@woocommerce/tracks';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2021-11-05 20:32:02 +00:00
|
|
|
import { default as ConnectForm } from '~/dashboard/components/connect';
|
|
|
|
import { SetupStepProps } from './setup';
|
2021-11-02 17:33:42 +00:00
|
|
|
|
2021-11-05 20:32:02 +00:00
|
|
|
export const Connect: React.FC< SetupStepProps > = ( {
|
2021-11-02 17:33:42 +00:00
|
|
|
onDisable,
|
|
|
|
onManual,
|
|
|
|
} ) => {
|
|
|
|
return (
|
|
|
|
<ConnectForm
|
2022-04-25 06:16:39 +00:00
|
|
|
// @ts-expect-error ConnectForm is pure JS component
|
2021-11-02 17:33:42 +00:00
|
|
|
onConnect={ () => {
|
|
|
|
recordEvent( 'tasklist_tax_connect_store', {
|
|
|
|
connect: true,
|
|
|
|
no_tax: false,
|
|
|
|
} );
|
|
|
|
} }
|
|
|
|
onSkip={ () => {
|
|
|
|
queueRecordEvent( 'tasklist_tax_connect_store', {
|
|
|
|
connect: false,
|
|
|
|
no_tax: false,
|
|
|
|
} );
|
|
|
|
onManual();
|
|
|
|
} }
|
2022-03-30 09:00:04 +00:00
|
|
|
skipText={ __( 'Set up tax rates manually', 'woocommerce' ) }
|
2021-11-02 17:33:42 +00:00
|
|
|
onAbort={ () => onDisable() }
|
|
|
|
abortText={ __(
|
|
|
|
"My business doesn't charge sales tax",
|
2022-03-30 09:00:04 +00:00
|
|
|
'woocommerce'
|
2021-11-02 17:33:42 +00:00
|
|
|
) }
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|