useAddressItem
Name | Type | Description |
---|---|---|
address | Object | Shopify address object |
selectAddress | Function | Selects an address |
addressSelectLoading | Boolean | Loading state of the address select |
isDefault | Boolean | Is the address default |
editAddress | Function | Edits 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,
});
};