From e481d6cecce20c696930d3c6ecb953d6e221361e Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Wed, 29 Nov 2023 09:40:22 +0530 Subject: [PATCH] Improve fork logic to switch based on the brand config. --- src/OnboardingSPA/steps/TheFork/index.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/OnboardingSPA/steps/TheFork/index.js b/src/OnboardingSPA/steps/TheFork/index.js index 0ba4458c5..142e7afba 100644 --- a/src/OnboardingSPA/steps/TheFork/index.js +++ b/src/OnboardingSPA/steps/TheFork/index.js @@ -9,7 +9,7 @@ import { HEADER_SITEGEN } from '../../../constants'; import { useNavigate } from 'react-router-dom'; import { Button } from '@wordpress/components'; -import { SITEGEN_FLOW } from '../../data/flows/constants'; +import { DEFAULT_FLOW, SITEGEN_FLOW } from '../../data/flows/constants'; import { resolveGetDataForFlow } from '../../data/flows'; import { validateFlow } from '../../data/flows/utils'; @@ -65,7 +65,7 @@ const TheFork = () => { const oldFlow = window.nfdOnboarding?.oldFlow ? window.nfdOnboarding.oldFlow - : window.nfdOnboarding.currentFlow; + : DEFAULT_FLOW; return ( { The Fork
- + { validateFlow( brandConfig, SITEGEN_FLOW ) && ( + + ) }