From b4cb7bf7517a0fb912438e4df1a1a32b9babba01 Mon Sep 17 00:00:00 2001 From: mmtr <1233880+mmtr@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:48:53 +0200 Subject: [PATCH] Use flow constants --- .../stepper/utils/flow-redirect-handler.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/client/landing/stepper/utils/flow-redirect-handler.ts b/client/landing/stepper/utils/flow-redirect-handler.ts index abbc9f79e9c31..4a2ef4f0b3670 100644 --- a/client/landing/stepper/utils/flow-redirect-handler.ts +++ b/client/landing/stepper/utils/flow-redirect-handler.ts @@ -1,12 +1,19 @@ +import { + BLOG_FLOW, + FREE_FLOW, + LINK_IN_BIO_FLOW, + VIDEOPRESS_FLOW, + SENSEI_FLOW, +} from '@automattic/onboarding'; import { recordTracksEvent } from 'calypso/lib/analytics/tracks'; // Flows to redirect export const REMOVED_TAILORED_FLOWS = [ - { flow: 'blog', to: '/start:lang?' }, - { flow: 'free', to: '/start/free:lang?' }, - { flow: 'link-in-bio', to: '/start:lang?' }, - { flow: 'videopress', to: '/start:lang?' }, - { flow: 'sensei', to: ':lang?/plugins/sensei-pro/' }, + { flow: BLOG_FLOW, to: '/start:lang?' }, + { flow: FREE_FLOW, to: '/start/free:lang?' }, + { flow: LINK_IN_BIO_FLOW, to: '/start:lang?' }, + { flow: VIDEOPRESS_FLOW, to: '/start:lang?' }, + { flow: SENSEI_FLOW, to: ':lang?/plugins/sensei-pro/' }, ]; // Regex pattern for the optional language code in the format xx or xx-yy