Skip to content

Commit

Permalink
Updates the migration status to started on the DIY flow
Browse files Browse the repository at this point in the history
  • Loading branch information
valterlorran committed Oct 8, 2024
1 parent 90ab2fa commit be92b83
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { LaunchpadContainer } from '@automattic/launchpad';
import { StepContainer } from '@automattic/onboarding';
import { useEffect } from 'react';
import { useMigrationStickerMutation } from 'calypso/data/site-migration/use-migration-sticker';
import { useUpdateMigrationStatus } from 'calypso/data/site-migration/use-update-migration-status';
import { useHostingProviderUrlDetails } from 'calypso/data/site-profiler/use-hosting-provider-url-details';
import { usePrepareSiteForMigration } from 'calypso/landing/stepper/hooks/use-prepare-site-for-migration';
import { useQuery } from 'calypso/landing/stepper/hooks/use-query';
Expand Down Expand Up @@ -83,11 +84,13 @@ const SiteMigrationInstructions: Step = function ( { navigation, flow } ) {

// Delete migration sticker.
const { deleteMigrationSticker } = useMigrationStickerMutation();
const { updateMigrationStatus } = useUpdateMigrationStatus();
useEffect( () => {
if ( siteId ) {
deleteMigrationSticker( siteId );
updateMigrationStatus( siteId, 'migration-started-diy' );
}
}, [ deleteMigrationSticker, siteId ] );
}, [ deleteMigrationSticker, siteId, updateMigrationStatus ] );

// Site preparation.
const {
Expand Down

0 comments on commit be92b83

Please sign in to comment.