Refactor the change shipping address and change card buttons to a more modular structure

This commit is contained in:
Daniel Dudzic 2024-09-13 17:27:39 +02:00
parent 3315fbe116
commit 90aa261c8b
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
27 changed files with 118 additions and 315 deletions

View file

@ -1,5 +1,4 @@
import { useCallback } from '@wordpress/element';
import useFastlaneSdk from "./useFastlaneSdk";
export const useCardChange = ( fastlaneSdk, setCard, setWooBillingAddress ) => {
return useCallback( async () => {

View file

@ -1,6 +1,5 @@
import { useCallback, useMemo } from '@wordpress/element';
import { useDispatch, useSelect } from '@wordpress/data';
import useFastlaneSdk from "./useFastlaneSdk";
export const useCustomerData = () => {
const customerData = useSelect( ( select ) =>