From 27d3955b947491ecf9bcd3bccd24fb039bf99d1d Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Fri, 23 Feb 2024 13:37:12 +0530 Subject: [PATCH] Make the magically disappeared Exit button reappear. --- .../components/SiteBuildHeader/index.js | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/OnboardingSPA/components/Header/components/SiteBuildHeader/index.js b/src/OnboardingSPA/components/Header/components/SiteBuildHeader/index.js index e41262533..34301f39d 100644 --- a/src/OnboardingSPA/components/Header/components/SiteBuildHeader/index.js +++ b/src/OnboardingSPA/components/Header/components/SiteBuildHeader/index.js @@ -1,8 +1,15 @@ import { memo } from '@wordpress/element'; import { Fill } from '@wordpress/components'; +import { useLocation } from 'react-router-dom'; import HeaderEnd from './HeaderEnd'; -import { HEADER_END, HEADER_SITEBUILD } from '../../../../../constants'; +import ExitToWordPress from '../../../ExitToWordPress'; +import { + HEADER_START, + HEADER_END, + HEADER_SITEBUILD, +} from '../../../../../constants'; +import { stepWelcome } from '../../../../steps/GetStarted/Welcome/step'; /** * Interface header rendered into header render prop in . @@ -10,10 +17,20 @@ import { HEADER_END, HEADER_SITEBUILD } from '../../../../../constants'; * @return {WPComponent} Header */ const SiteBuildHeader = () => { + const location = useLocation(); + const isGettingStarted = stepWelcome.path === location?.pathname; + return ( - - - + <> + + { isGettingStarted ? ( + + ) : null } + + + + + ); };