Switch from date-fns to day.js (#213)

This commit is contained in:
Luke Vella 2022-06-28 18:36:23 +01:00 committed by GitHub
parent 368f324865
commit 707eae68c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 549 additions and 229 deletions

View file

@ -1,4 +1,4 @@
import { formatRelative } from "date-fns";
import dayjs from "dayjs";
import Head from "next/head";
import Link from "next/link";
import { useTranslation } from "next-i18next";
@ -83,7 +83,7 @@ export const Profile: React.VoidFunctionComponent = () => {
</Link>
</div>
<div className="ml-7 text-sm text-slate-500">
{formatRelative(poll.createdAt, new Date())}
{dayjs(poll.createdAt).fromNow()}
</div>
</div>
</div>