Skip to content

Commit 3fa1aac

Browse files
author
Onur Saf
committedFeb 6, 2025
format staked at date
1 parent d259499 commit 3fa1aac

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎src/components/StakingList/index.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,18 @@ import {
2020
} from '@mantine/core';
2121
import { modals } from '@mantine/modals';
2222
import { IconBriefcase, IconPlus } from '@tabler/icons-react';
23+
import utc from 'dayjs/plugin/utc';
24+
import localizedFormat from 'dayjs/plugin/localizedFormat';
2325
import dayjs from 'dayjs';
2426
import { useState } from 'react';
2527
import { formatUnits } from 'viem';
2628
import { useAccount } from 'wagmi';
2729
import StakingCard from '../StakingCard';
2830
import classes from './StakingList.module.css';
2931

32+
dayjs.extend(utc);
33+
dayjs.extend(localizedFormat);
34+
3035
const StakingList = () => {
3136
const { address, isConnected } = useAccount();
3237
const [activePage, setActivePage] = useState(0);
@@ -197,9 +202,7 @@ const StakingList = () => {
197202
<Group mt='lg'>
198203
<div>
199204
<Text className={classes.label}>
200-
{dayjs(stakedAt * 1000).format(
201-
'YYYY-MM-DDTHH:mm:ssZ[Z]'
202-
)}
205+
{dayjs.utc(stakedAt * 1000).format('LLL')}
203206
</Text>
204207
<Text
205208
size='xs'

0 commit comments

Comments
 (0)