Skip to content

Commit

Permalink
maybe i should just pull the repo and test locally
Browse files Browse the repository at this point in the history
  • Loading branch information
uno-p-5 authored Apr 25, 2024
1 parent 684b449 commit d5e71ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/search/Blurb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const Blurb = (props: BlurbProps) => {
const [timeAgo, setTimeAgo] = useState("");

useEffect(() => {
const getTimeAgo = (date) => {
const getTimeAgo = (date: number) => {
const now = new Date();
const updatedDate = new Date(date);
const diff = now - updatedDate;
const diff = now.getTime() - updatedDate.getTime();

const seconds = Math.floor((diff / 1000) % 60);
const minutes = Math.floor((diff / 1000 / 60) % 60);
Expand Down

0 comments on commit d5e71ba

Please sign in to comment.