File size: 522 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import { recordTracksEvent } from 'calypso/state/analytics/actions';
import {
requestJetpackScanEnqueue,
startScanOptimistically,
} from 'calypso/state/jetpack-scan/enqueue/actions';
import type { Dispatch } from 'redux';
export const triggerScanRun =
( siteId: number ) =>
( dispatch: Dispatch< any > ): void => {
dispatch(
recordTracksEvent( 'calypso_jetpack_scan_run', {
site_id: siteId,
} )
);
dispatch( requestJetpackScanEnqueue( siteId ) );
dispatch( startScanOptimistically( siteId ) );
};
|