"use client";

// import { AddToCartModal } from "@components/common/AddToCartModal/AddToCartModal";
import { useAppSelector } from "@/store/hooks";
import dynamic from 'next/dynamic';

const AddToCartModal = dynamic(() => import("./AddToCartModal"),{ssr: false});
export function AddToCartModalWrapper() {
  const {product} = useAppSelector((state) => state.addToCartDialog);

  return (
    <AddToCartModal key={product?.id} />
  );
}