Skip to content

Commit

Permalink
Merge pull request #155 from SpaceyaTech/blogs-card-time
Browse files Browse the repository at this point in the history
correct created_at date
  • Loading branch information
JimmyTron authored Apr 23, 2024
2 parents 982ef22 + e3b9928 commit 3b5f8f8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/APP/pages/blogs/sections/BlogCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import logo from "../../../../assets/images/sytLogo.png";
import BlogStats from "./BlogStats";

function BlogCard({ blog }) {
const timeAgo = blog?.created_at;
formatDistanceToNow(new Date(blog?.created_at), {
const timeAgo = formatDistanceToNow(new Date(blog?.created_at), {
addSuffix: true,
});

Expand All @@ -22,9 +21,7 @@ function BlogCard({ blog }) {
<LazyLoadImage
src={blog.image}
alt={blog.title}

className="w-full h-60 object-cover rounded-lg asp"

/>

<div className="py-[6px] flex flex-col gap-[10px] w-full mt-2">
Expand Down

0 comments on commit 3b5f8f8

Please sign in to comment.