This commit is contained in:
carmenmaymo 2025-01-28 13:55:43 +01:00
parent ede2cb51b3
commit 2f99866267
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E

View file

@ -4,17 +4,24 @@ import { __ } from '@wordpress/i18n';
import TopNavigation from '../../../ReusableComponents/TopNavigation';
import { useSaveSettings } from '../../../../hooks/useSaveSettings';
const SettingsNavigation = ( { canSave = true, tabs, activePanel, setActivePanel } ) => {
const SettingsNavigation = ( {
canSave = true,
tabs,
activePanel,
setActivePanel,
} ) => {
const { persistAll } = useSaveSettings();
const title = __( 'PayPal Payments', 'woocommerce-paypal-payments' );
return (
<TopNavigation title={ title } exitOnTitleClick={ true }
tabs={ tabs }
activePanel={ activePanel }
setActivePanel={ setActivePanel }
>
<TopNavigation
title={ title }
exitOnTitleClick={ true }
tabs={ tabs }
activePanel={ activePanel }
setActivePanel={ setActivePanel }
>
{ canSave && (
<Button variant="primary" onClick={ persistAll }>
{ __( 'Save', 'woocommerce-paypal-payments' ) }