Skip to content

Commit

Permalink
remove dayjs, use date-fns
Browse files Browse the repository at this point in the history
  • Loading branch information
apexearth committed Sep 29, 2023
1 parent 55b4ead commit de71b12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const meta: Meta<typeof FinancialStatement> = {
blockNumber: 18036316,
timestamp: Date.parse('2023-09-03T21:42:03Z'),
},
columns: ['31 August 2023', '1 week ago'],
columns: ['1 week ago', '31 August 2023'],
data: {
assets: {
Vault: {
Expand Down
7 changes: 5 additions & 2 deletions libs/financial-statement/src/FinancialStatement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { theme } from '@origin/shared/theme';
import { QueryClientProvider } from '@tanstack/react-query';
import {
endOfToday,
formatRelative,
intlFormat,
intlFormatDistance,
startOfDay,
subDays,
} from 'date-fns';
Expand Down Expand Up @@ -103,7 +103,10 @@ export const LiveFinancialStatement = () => {
blockNumber,
timestamp,
}}
columns={[formatRelative(sevenDaysAgo, new Date()), intlFormat(todayEnd)]}
columns={[
intlFormatDistance(sevenDaysAgo, new Date()),
intlFormat(todayEnd),
]}
data={{
assets: {
Vault: {
Expand Down

0 comments on commit de71b12

Please sign in to comment.