diff --git a/package.json b/package.json index 8d00a83a1..20f750a97 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@solana/web3.js": "^1.73.0", "@tailwindcss/typography": "^0.5.9", "daisyui": "^1.24.3", - "date-fns": "^2.29.3", + "dayjs": "^1.11.10", "immer": "^9.0.12", "next": "^13.1.5", "next-compose-plugins": "^2.2.1", diff --git a/src/utils/index.tsx b/src/utils/index.tsx index 144b3cdd9..296ea5eb2 100644 --- a/src/utils/index.tsx +++ b/src/utils/index.tsx @@ -1,9 +1,9 @@ -import { format } from 'date-fns'; +import dayjs from 'dayjs'; // Concatenates classes into a single className string const cn = (...args: string[]) => args.join(' '); -const formatDate = (date: string) => format(new Date(date), 'MM/dd/yyyy h:mm:ss'); +const formatDate = (date: string) => dayjs(date).format('MM/dd/yyyy h:mm:ss'); /** * Formats number as currency string.