import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import ProductSwiper from "./ProductSwiper";

const Products = () => {
  const {t}  = useTranslation();

  const navigate = useNavigate();
  const handelSeeAll = () => {
    navigate(`/categories?type=best_sale`);
  };
  return (
    <div className="Products">
      <header>
        <h1>{t("Best Sale")}</h1>
        <h5 className="pointer" onClick={handelSeeAll}> {t("View all")} </h5>
      </header>
      <main className="ProductCards">
        <ProductSwiper/>
      </main>
    </div>
  );
};

export default Products;
