prettier and lint

This commit is contained in:
StephDietz 2023-07-10 14:25:03 -05:00
parent dd5a2a5388
commit 16f2f019ea
3 changed files with 20 additions and 20 deletions

View File

@ -52,9 +52,9 @@ export default function EditItemQuantityButton({
{isPending ? ( {isPending ? (
<LoadingDots className="bg-black dark:bg-white" /> <LoadingDots className="bg-black dark:bg-white" />
) : type === 'plus' ? ( ) : type === 'plus' ? (
<PlusIcon className="w-4 h-4 dark:text-neutral-500" /> <PlusIcon className="h-4 w-4 dark:text-neutral-500" />
) : ( ) : (
<MinusIcon className="w-4 h-4 dark:text-neutral-500" /> <MinusIcon className="h-4 w-4 dark:text-neutral-500" />
)} )}
</button> </button>
); );

View File

@ -86,13 +86,13 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
</div> </div>
{cart.lines.length === 0 ? ( {cart.lines.length === 0 ? (
<div className="flex flex-col items-center justify-center w-full mt-20 overflow-hidden"> <div className="mt-20 flex w-full flex-col items-center justify-center overflow-hidden">
<ShoppingCartIcon className="h-16" /> <ShoppingCartIcon className="h-16" />
<p className="mt-6 text-2xl font-bold text-center">Your cart is empty.</p> <p className="mt-6 text-center text-2xl font-bold">Your cart is empty.</p>
</div> </div>
) : ( ) : (
<div className="flex flex-col justify-between h-full overflow-hidden"> <div className="flex h-full flex-col justify-between overflow-hidden">
<ul className="flex-grow py-4 overflow-auto"> <ul className="flex-grow overflow-auto py-4">
{cart.lines.map((item, i) => { {cart.lines.map((item, i) => {
const merchandiseSearchParams = {} as MerchandiseSearchParams; const merchandiseSearchParams = {} as MerchandiseSearchParams;
@ -111,9 +111,9 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
<li <li
key={i} key={i}
data-testid="cart-item" data-testid="cart-item"
className="flex flex-col w-full border-b border-neutral-300 dark:border-neutral-700" className="flex w-full flex-col border-b border-neutral-300 dark:border-neutral-700"
> >
<div className="relative flex flex-row justify-between w-full py-4"> <div className="relative flex w-full flex-row justify-between py-4">
<div className="absolute z-40 -mt-2 ml-[55px]"> <div className="absolute z-40 -mt-2 ml-[55px]">
<DeleteItemButton item={item} /> <DeleteItemButton item={item} />
</div> </div>
@ -122,9 +122,9 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
onClick={closeCart} onClick={closeCart}
className="z-30 flex flex-row space-x-4" className="z-30 flex flex-row space-x-4"
> >
<div className="relative w-16 h-16 overflow-hidden border rounded-md cursor-pointer border-neutral-300 bg-neutral-300 dark:border-neutral-700 dark:bg-neutral-900 dark:hover:bg-neutral-800"> <div className="relative h-16 w-16 cursor-pointer overflow-hidden rounded-md border border-neutral-300 bg-neutral-300 dark:border-neutral-700 dark:bg-neutral-900 dark:hover:bg-neutral-800">
<Image <Image
className="object-cover w-full h-full " className="h-full w-full object-cover "
width={64} width={64}
height={64} height={64}
alt={ alt={
@ -135,7 +135,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
/> />
</div> </div>
<div className="flex flex-col flex-1 text-base"> <div className="flex flex-1 flex-col text-base">
<span className="leading-tight"> <span className="leading-tight">
{item.merchandise.product.title} {item.merchandise.product.title}
</span> </span>
@ -149,13 +149,13 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
) : null} ) : null}
</div> </div>
</Link> </Link>
<div className="flex flex-col justify-between h-16"> <div className="flex h-16 flex-col justify-between">
<Price <Price
className="flex flex-col justify-between space-y-2 text-sm" className="flex flex-col justify-between space-y-2 text-sm"
amount={item.cost.totalAmount.amount} amount={item.cost.totalAmount.amount}
currencyCode={item.cost.totalAmount.currencyCode} currencyCode={item.cost.totalAmount.currencyCode}
/> />
<div className="flex flex-row items-center ml-auto border rounded-full h-9 border-neutral-200 dark:border-neutral-700"> <div className="ml-auto flex h-9 flex-row items-center rounded-full border border-neutral-200 dark:border-neutral-700">
<EditItemQuantityButton item={item} type="minus" /> <EditItemQuantityButton item={item} type="minus" />
<p className="w-6 text-center "> <p className="w-6 text-center ">
<span className="w-full text-sm">{item.quantity}</span> <span className="w-full text-sm">{item.quantity}</span>
@ -169,22 +169,22 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
})} })}
</ul> </ul>
<div className="py-4 text-sm text-neutral-400 dark:text-neutral-500"> <div className="py-4 text-sm text-neutral-400 dark:text-neutral-500">
<div className="flex items-center justify-between pb-1 mb-3 border-b border-neutral-200 dark:border-neutral-700"> <div className="mb-3 flex items-center justify-between border-b border-neutral-200 pb-1 dark:border-neutral-700">
<p>Taxes</p> <p>Taxes</p>
<Price <Price
className="text-base text-right text-black dark:text-white" className="text-right text-base text-black dark:text-white"
amount={cart.cost.totalTaxAmount.amount} amount={cart.cost.totalTaxAmount.amount}
currencyCode={cart.cost.totalTaxAmount.currencyCode} currencyCode={cart.cost.totalTaxAmount.currencyCode}
/> />
</div> </div>
<div className="flex items-center justify-between pt-1 pb-1 mb-3 border-b border-neutral-200 dark:border-neutral-700"> <div className="mb-3 flex items-center justify-between border-b border-neutral-200 pb-1 pt-1 dark:border-neutral-700">
<p>Shipping</p> <p>Shipping</p>
<p className="text-right">Calculated at checkout</p> <p className="text-right">Calculated at checkout</p>
</div> </div>
<div className="flex items-center justify-between pt-1 pb-1 mb-3 border-b border-neutral-200 dark:border-neutral-700"> <div className="mb-3 flex items-center justify-between border-b border-neutral-200 pb-1 pt-1 dark:border-neutral-700">
<p>Total</p> <p>Total</p>
<Price <Price
className="text-base text-right text-black dark:text-white" className="text-right text-base text-black dark:text-white"
amount={cart.cost.totalAmount.amount} amount={cart.cost.totalAmount.amount}
currencyCode={cart.cost.totalAmount.currencyCode} currencyCode={cart.cost.totalAmount.currencyCode}
/> />
@ -192,7 +192,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
</div> </div>
<a <a
href={cart.checkoutUrl} href={cart.checkoutUrl}
className="flex items-center justify-center w-full p-3 text-sm font-medium text-white bg-blue-600 rounded-full opacity-90 hover:opacity-100" className="flex w-full items-center justify-center rounded-full bg-blue-600 p-3 text-sm font-medium text-white opacity-90 hover:opacity-100"
> >
<span>Proceed to Checkout</span> <span>Proceed to Checkout</span>
</a> </a>

View File

@ -12,7 +12,7 @@ export default function CartIcon({
icon?: string; icon?: string;
}) { }) {
return ( return (
<div className="relative flex items-center justify-center text-black transition-colors border rounded-md h-11 w-11 border-neutral-200 dark:border-neutral-700 dark:text-white"> <div className="relative flex h-11 w-11 items-center justify-center rounded-md border border-neutral-200 text-black transition-colors dark:border-neutral-700 dark:text-white">
{icon === 'close' ? ( {icon === 'close' ? (
<CloseIcon className={clsx('h-6 transition-all ease-in-out hover:scale-110 ', className)} /> <CloseIcon className={clsx('h-6 transition-all ease-in-out hover:scale-110 ', className)} />
) : ( ) : (