Skip to content

Commit

Permalink
Rename the useAxoBlockManager hook to useFastlaneSdk
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldudzic committed Sep 12, 2024
1 parent fb0e093 commit f470fb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 } );
Expand Down Expand Up @@ -48,4 +48,4 @@ const useAxoBlockManager = ( axoConfig, ppcpConfig ) => {
return fastlaneSdk;
};

export default useAxoBlockManager;
export default useFastlaneSdk;
4 changes: 2 additions & 2 deletions modules/ppcp-axo-block/resources/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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' );

Expand Down

0 comments on commit f470fb0

Please sign in to comment.