lint and prettier

This commit is contained in:
StephDietz 2023-07-07 09:11:34 -05:00
parent d9f07168fe
commit 7f6704180a
4 changed files with 16 additions and 16 deletions

View File

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

View File

@ -87,13 +87,13 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
</div>
{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" />
<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 className="flex flex-col justify-between h-full overflow-hidden">
<ul className="flex-grow py-4 overflow-auto">
<div className="flex h-full flex-col justify-between overflow-hidden">
<ul className="flex-grow overflow-auto py-4">
{cart.lines.map((item, i) => {
const merchandiseSearchParams = {} as MerchandiseSearchParams;
@ -114,7 +114,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
data-testid="cart-item"
className="flex w-full flex-col border-b border-black/[8%] dark:border-dark-gray-4"
>
<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]">
<DeleteItemButton item={item} />
</div>
@ -125,7 +125,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
>
<div className="relative h-16 w-16 cursor-pointer overflow-hidden rounded-md border border-black/[8%] bg-black/[5%] dark:border-dark-gray-4 dark:bg-white/[6.6%] dark:hover:bg-white/[8.7%]">
<Image
className="object-cover w-full h-full "
className="h-full w-full object-cover "
width={64}
height={64}
alt={
@ -136,7 +136,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
/>
</div>
<div className="flex flex-col flex-1 text-base">
<div className="flex flex-1 flex-col text-base">
<span className="leading-tight">
{item.merchandise.product.title}
</span>
@ -150,13 +150,13 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
) : null}
</div>
</Link>
<div className="flex flex-col justify-between h-16">
<div className="flex h-16 flex-col justify-between">
<Price
className="flex flex-col justify-between space-y-2 text-sm"
amount={item.cost.totalAmount.amount}
currencyCode={item.cost.totalAmount.currencyCode}
/>
<div className="flex flex-row items-center ml-auto border rounded-full h-9 border-dark-gray-4">
<div className="ml-auto flex h-9 flex-row items-center rounded-full border border-dark-gray-4">
<EditItemQuantityButton item={item} type="minus" />
<p className="">
<span className="w-full px-2 text-sm">{item.quantity}</span>
@ -173,7 +173,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
<div className="mb-3 flex items-center justify-between border-b border-black/[8%] pb-1 dark:border-dark-gray-4">
<p>Taxes</p>
<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}
currencyCode={cart.cost.totalTaxAmount.currencyCode}
/>
@ -185,7 +185,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
<div className="mb-3 flex items-center justify-between border-b border-black/[8%] pb-1 pt-1 dark:border-dark-gray-4">
<p>Total</p>
<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}
currencyCode={cart.cost.totalAmount.currencyCode}
/>
@ -193,7 +193,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
</div>
<a
href={cart.checkoutUrl}
className="flex items-center justify-center w-full p-3 text-sm font-medium text-white rounded-full bg-vercel-blue opacity-90 hover:opacity-100"
className="flex w-full items-center justify-center rounded-full bg-vercel-blue p-3 text-sm font-medium text-white opacity-90 hover:opacity-100"
>
<span>Proceed to Checkout</span>
</a>

View File

@ -9,7 +9,7 @@ export default function CartIcon({
quantity?: number;
}) {
return (
<div className="relative flex items-center justify-center text-black transition-colors border rounded-md h-11 w-11 border-light-gray-4 dark:border-dark-gray-4 dark:text-white">
<div className="relative flex h-11 w-11 items-center justify-center rounded-md border border-light-gray-4 text-black transition-colors dark:border-dark-gray-4 dark:text-white">
<ShoppingCartIcon
className={clsx('h-6 transition-all ease-in-out hover:scale-110 ', className)}
/>

View File

@ -1,4 +1,4 @@
export default function ShoppingCartIcon({ className }: { className?: string }) {
export default function ShoppingCartIcon() {
return (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_137_611)">