import { useTranslation } from "react-i18next";
import { useGetProducts } from "../../api/products";
import ProductSwiper from '../../Components/Products/ProductSwiper';

const Similar = ({category_id}:any) => {
  const { data,isLoading } = useGetProducts({
    category_id:[category_id]
  });
  const {t} = useTranslation();
  
  return (
    <div className="similar_product">
      <h1>{t("Similar Products")}</h1>
      <main className="ProductCards">
        <ProductSwiper data={data} isLoading={isLoading} />
      </main>
    </div>
  );
};

export default Similar;
