diff --git a/src/OnboardingSPA/components/Drawer/DrawerPanel/NavPrimary.js b/src/OnboardingSPA/components/Drawer/DrawerPanel/NavPrimary.js index 657f149d1..e2842a36d 100644 --- a/src/OnboardingSPA/components/Drawer/DrawerPanel/NavPrimary.js +++ b/src/OnboardingSPA/components/Drawer/DrawerPanel/NavPrimary.js @@ -1,7 +1,5 @@ -import { Button, Tooltip } from '@wordpress/components'; -import { NavLink, useLocation, useNavigate } from 'react-router-dom'; - -import ExitToWordPress from '../../ExitToWordPress'; +import { Tooltip } from '@wordpress/components'; +import { NavLink, useLocation } from 'react-router-dom'; import { Icon } from '@wordpress/icons'; import { store as nfdOnboardingStore } from '../../../store'; @@ -10,7 +8,6 @@ import classNames from 'classnames'; import Animate from '../../Animate'; const NavPrimary = () => { - const navigate = useNavigate(); const location = useLocation(); const { topSteps } = useSelect( ( select ) => { return { @@ -19,25 +16,8 @@ const NavPrimary = () => { }, [] ); const { setDrawerActiveView } = useDispatch( nfdOnboardingStore ); - - const isFirstStep = topSteps[ 0 ].path === location.pathname; return ( - { ( isFirstStep && ( - - ) ) || ( - - ) }
    { topSteps.map( ( step ) => { diff --git a/src/OnboardingSPA/components/Header/index.js b/src/OnboardingSPA/components/Header/index.js index 45d7da21a..079332dfc 100644 --- a/src/OnboardingSPA/components/Header/index.js +++ b/src/OnboardingSPA/components/Header/index.js @@ -1,34 +1,15 @@ -import { __ } from '@wordpress/i18n'; -import { useLocation } from 'react-router-dom'; import { memo } from '@wordpress/element'; -import { useSelect } from '@wordpress/data'; import HeaderEnd from './components/HeaderEnd'; -import ExitToWordPress from '../ExitToWordPress'; -import { store as nfdOnboardingStore } from '../../store'; /** * Interface header rendered into header render prop in . * - * @return Header + * @return {WPComponent} Header */ const Header = () => { - const location = useLocation(); - - const { firstStep } = useSelect( ( select ) => { - return { - firstStep: select( nfdOnboardingStore ).getFirstStep(), - }; - }, [] ); - - const isGettingStarted = firstStep?.path === location?.pathname; return (
    -
    - { isGettingStarted ? ( - - ) : null } -
    { /* Centered Header Slot */ }