diff --git a/client/src/component/Blog.jsx b/client/src/component/Blog.jsx index b4061f9..2806771 100644 --- a/client/src/component/Blog.jsx +++ b/client/src/component/Blog.jsx @@ -43,16 +43,16 @@ export default function BlogPage(props) { return matchesSearch && matchesCategory; }); - const formatDate = (dateString) => { - const date = new Date(dateString); - if (isNaN(date.getTime())) { - throw new Error("Invalid date format"); - } - const day = String(date.getDate()).padStart(2, "0"); - const month = String(date.getMonth() + 1).padStart(2, "0"); - const year = date.getFullYear(); - return `${day}-${month}-${year}`; - }; + // const formatDate = (dateString) => { + // const date = new Date(dateString); + // if (isNaN(date.getTime())) { + // throw new Error("Invalid date format"); + // } + // const day = String(date.getDate()).padStart(2, "0"); + // const month = String(date.getMonth() + 1).padStart(2, "0"); + // const year = date.getFullYear(); + // return `${day}-${month}-${year}`; + // }; const categoryImage = (cat) => { const imgSrc = images.find((image) => image.category === cat); @@ -160,70 +160,87 @@ export default function BlogPage(props) { {/* Blog Grid */}