Skip to content

Commit a755836

Browse files
committed
fix: ensure timestamp is correctly parsed as a number and clean up imports in protectedDataList
1 parent 3384212 commit a755836

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utils/formatTimestamp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function formatTimestamp(timestamp: string | number): string {
2-
const date = new Date(timestamp * 1000);
2+
const date = new Date(Number(timestamp) * 1000);
33
return new Intl.DateTimeFormat('en-US', {
44
year: 'numeric',
55
month: '2-digit',

src/views/myData/protectedDataList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useQuery } from '@tanstack/react-query';
22
import { useState, useEffect } from 'react';
33
import { ArrowRight } from 'react-feather';
4-
import { Link, NavLink } from 'react-router-dom';
4+
import { Link } from 'react-router-dom';
55
import protectANewData from '@/assets/protect_a_new_data.png';
66
import { Alert } from '@/components/Alert';
77
import { CircularLoader } from '@/components/CircularLoader';

0 commit comments

Comments
 (0)