Fix broken onboarding when no tabs were passed

This commit is contained in:
carmenmaymo 2025-01-28 14:09:59 +01:00
parent 2f99866267
commit f88d547451
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E

View file

@ -16,9 +16,9 @@ const TopNavigation = ( {
onTitleClick = null,
showProgressBar = false,
progressBarPercent = 0,
tabs,
activePanel,
setActivePanel,
tabs = [],
activePanel = '',
setActivePanel = () => {},
} ) => {
const { goToWooCommercePaymentsTab } = useNavigation();
const { isScrolled } = useIsScrolled();
@ -69,11 +69,13 @@ const TopNavigation = ( {
{ children }
</BusyStateWrapper>
</div>
<TabNavigation
tabs={ tabs }
activePanel={ activePanel }
setActivePanel={ setActivePanel }
></TabNavigation>
{ tabs.length > 0 && (
<TabNavigation
tabs={ tabs }
activePanel={ activePanel }
setActivePanel={ setActivePanel }
/>
) }
{ showProgressBar && (
<ProgressBar percent={ progressBarPercent } />