mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
🎨 Leverage PaymentHooks instead of direct import
This commit is contained in:
parent
6e2f58c565
commit
9fdc370c21
1 changed files with 3 additions and 6 deletions
|
@ -7,19 +7,16 @@ import {
|
|||
} from '@wordpress/components';
|
||||
import { useState } from '@wordpress/element';
|
||||
import PaymentMethodModal from '../../../../ReusableComponents/PaymentMethodModal';
|
||||
import {
|
||||
usePaymentMethods,
|
||||
usePaymentMethodsModal,
|
||||
} from '../../../../../data/payment/hooks';
|
||||
import { PaymentHooks } from '../../../../../data';
|
||||
|
||||
const Modal = ( { method, setModalIsVisible, onSave } ) => {
|
||||
const { paymentMethods } = usePaymentMethods();
|
||||
const { paymentMethods } = PaymentHooks.usePaymentMethods();
|
||||
const {
|
||||
paypalShowLogo,
|
||||
threeDSecure,
|
||||
fastlaneCardholderName,
|
||||
fastlaneDisplayWatermark,
|
||||
} = usePaymentMethodsModal();
|
||||
} = PaymentHooks.usePaymentMethodsModal();
|
||||
|
||||
const [ settings, setSettings ] = useState( () => {
|
||||
if ( ! method?.id ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue