Rename the useAxoBlockManager hook to useFastlaneSdk

This commit is contained in:
Daniel Dudzic 2024-09-12 14:37:22 +02:00
parent fb0e0939a2
commit f470fb0c53
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
2 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from '@wordpress/element';
import Fastlane from '../../../../ppcp-axo/resources/js/Connection/Fastlane';
import { log } from '../../../../ppcp-axo/resources/js/Helper/Debug';
const useAxoBlockManager = ( axoConfig, ppcpConfig ) => {
const useFastlaneSdk = ( axoConfig, ppcpConfig ) => {
const [ fastlaneSdk, setFastlaneSdk ] = useState( null );
const initializingRef = useRef( false );
const configRef = useRef( { axoConfig, ppcpConfig } );
@ -48,4 +48,4 @@ const useAxoBlockManager = ( axoConfig, ppcpConfig ) => {
return fastlaneSdk;
};
export default useAxoBlockManager;
export default useFastlaneSdk;

View file

@ -6,7 +6,7 @@ import { registerPaymentMethod } from '@woocommerce/blocks-registry';
import { loadPaypalScript } from '../../../ppcp-button/resources/js/modules/Helper/ScriptLoading';
// Hooks
import useAxoBlockManager from './hooks/useAxoBlockManager';
import useFastlaneSdk from './hooks/useFastlaneSdk';
import { useCustomerData } from './hooks/useCustomerData';
import { useShippingAddressChange } from './hooks/useShippingAddressChange';
import { useCardChange } from './hooks/useCardChange';
@ -46,7 +46,7 @@ const Axo = ( props ) => {
const [ paypalLoaded, setPaypalLoaded ] = useState( false );
const [ shippingAddress, setShippingAddress ] = useState( null );
const [ card, setCard ] = useState( null );
const fastlaneSdk = useAxoBlockManager( axoConfig, ppcpConfig );
const fastlaneSdk = useFastlaneSdk( axoConfig, ppcpConfig );
console.log( 'Axo component rendering' );