mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
33 lines
777 B
JavaScript
33 lines
777 B
JavaScript
import ConnectionStatus from './TabSettingsElements/ConnectionStatus';
|
|
import CommonSettings from './TabSettingsElements/CommonSettings';
|
|
import ExpertSettings from './TabSettingsElements/ExpertSettings';
|
|
import { useSettings } from '../../../data/settings-tab/hooks';
|
|
|
|
const TabSettings = () => {
|
|
const { settings, setSettings } = useSettings();
|
|
|
|
const updateFormValue = ( key, value ) => {
|
|
setSettings( {
|
|
...settings,
|
|
[ key ]: value,
|
|
} );
|
|
};
|
|
|
|
return (
|
|
<>
|
|
<div className="ppcp-r-settings">
|
|
<ConnectionStatus />
|
|
<CommonSettings
|
|
settings={ settings }
|
|
updateFormValue={ updateFormValue }
|
|
/>
|
|
<ExpertSettings
|
|
settings={ settings }
|
|
updateFormValue={ updateFormValue }
|
|
/>
|
|
</div>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default TabSettings;
|