import AddressCard from '@/components/AddressCard'; import { Button } from '@/components/Button'; import { Text } from '@/components/Text'; import { Customer, MailingAddress } from '@/lib/shopify/types'; import { convertObjectToQueryString } from '@/lib/utils'; export default function AccountBook({ customer, addresses, }: { customer: Customer; addresses: MailingAddress[]; }) { return ( <>

Address Book

{!addresses?.length && ( You haven't saved any addresses yet. )}
Add an Address
{Boolean(addresses?.length) && (
{customer.defaultAddress && ( )} {addresses .filter(address => address.id !== customer.defaultAddress?.id) .map(address => ( ))}
)}
); }