dm-website/src/Components/Home/BestSale.tsx
2024-06-10 11:01:05 +03:00

26 lines
622 B
TypeScript

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;