diff --git a/components/Countdown.jsx b/components/Countdown.jsx index f77fa64..ee0b0c4 100644 --- a/components/Countdown.jsx +++ b/components/Countdown.jsx @@ -28,7 +28,7 @@ const CountdownTimer = ({ endDate }) => { }, [endDate]); return ( -
- {product.description.split(".")[0]}. + {product.description?.split(".")[0]}.
diff --git a/pages/index.js b/pages/index.js index 3c9cd9b..c87efe4 100644 --- a/pages/index.js +++ b/pages/index.js @@ -2,15 +2,24 @@ import Slider from "@/components/Slider"; import ProductsPage from "./products"; import { getAllProducts } from "@/prisma/products"; import Countdown from "@/components/Countdown"; +import MenProductsPage from "./products/men"; +import WomenProductsPage from "./products/women"; const HomePage = ({ products }) => { const endDate = new Date().getTime() + 48 * 60 * 60 * 1000; + const menProducts = products.filter((product) => product.category === "Men"); + const womenProducts = products.filter( + (product) => product.category === "Women" + ); + return (