All files / src/components/features/cart/CartSidebarModal EmptyCart.tsx

28.57% Statements 8/28
100% Branches 0/0
0% Functions 0/1
28.57% Lines 8/28

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 291x 1x 1x 1x 1x 1x                                         1x 1x  
import React from "react";
import Link from "next/link";
import { useCartModalContext } from "@/contexts";
import { Icon } from "@/components/ui/icons";
 
const EmptyCart = () => {
  const { closeCartModal } = useCartModalContext();

  return (
    <div className="text-center">
      <div className="mx-auto pb-7.5">
        <Icon name="empty-cart" className="mx-auto" width={100} height={100} />
      </div>

      <p className="pb-6">Your cart is empty!</p>

      <Link
        onClick={() => closeCartModal()}
        href="/shop"
        className="w-full lg:w-10/12 mx-auto flex justify-center font-medium text-white bg-dark py-[13px] px-6 rounded-md ease-out duration-200 hover:bg-opacity-95"
      >
        Continue Shopping
      </Link>
    </div>
  );
};
 
export default EmptyCart;