From be92b837e555f7739c2bf27f8a1defd479b082b2 Mon Sep 17 00:00:00 2001 From: Valter Lorran Date: Tue, 8 Oct 2024 20:50:58 -0300 Subject: [PATCH] Updates the migration status to started on the DIY flow --- .../steps-repository/site-migration-instructions/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-instructions/index.tsx b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-instructions/index.tsx index c5ef12b4ceeff..e0eedcb7c9660 100644 --- a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-instructions/index.tsx +++ b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-instructions/index.tsx @@ -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'; @@ -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 {