woocommerce/plugins/woocommerce-admin/client/tasks/fills/experimental-shipping-recom.../components/connect.tsx

28 lines
554 B
TypeScript

/**
* External dependencies
*/
import { recordEvent } from '@woocommerce/tracks';
/**
* Internal dependencies
*/
import { default as ConnectForm } from '~/dashboard/components/connect';
type ConnectProps = {
onConnect: () => void;
};
export const Connect: React.FC< ConnectProps > = ( { onConnect } ) => {
return (
<ConnectForm
// @ts-expect-error ConnectForm is pure JS component
onConnect={ () => {
recordEvent( 'tasklist_shipping_recommendation_connect_store', {
connect: true,
} );
onConnect?.();
} }
/>
);
};