Skip to content

Commit

Permalink
fixed date bug on forum card
Browse files Browse the repository at this point in the history
  • Loading branch information
vanesssalai authored Jul 13, 2024
1 parent 19aba15 commit 0b0ff73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/forumcards/ForumCards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { db } from '../../lib/firebaseConfig';
import './ForumCards.css';

function timeSincePost(postDate) {
const now = new Date().toISOString();
const now = new Date();
const posted = new Date(postDate);
const diffInSeconds = Math.floor((now - posted) / 1000);

Expand Down Expand Up @@ -403,4 +403,4 @@ function ForumCards({ forumDetail, descriptionLength = 200 }) {
);
}

export default ForumCards;
export default ForumCards;

0 comments on commit 0b0ff73

Please sign in to comment.