Skip to main content

useAddressItem

NameTypeDescription
addressObjectShopify address object
selectAddressFunctionSelects an address
addressSelectLoadingBooleanLoading state of the address select
isDefaultBooleanIs the address default
editAddressFunctionEdits an address

Usage:

import { useAddressItem } from '@appmaker-xyz/shopify';

const AddressCardItem = ({
onAction,
address: propAddress,
defaultAddressID,
toggleModal,
}) => {
const {
address,
selectAddress,
addressSelectLoading,
isDefault,
editAddress,
} = useAddressItem({
onAction,
address: propAddress,
defaultAddressID,
});
};