Skip to content

Commit

Permalink
fix(dashboard): use Date class on main table
Browse files Browse the repository at this point in the history
Fixing date format at main table and tooltip

Closes #293
  • Loading branch information
Lucas Bracher committed Sep 13, 2024
1 parent ad92e92 commit ee0fb47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dashboard/src/components/Table/TreeTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ const TreeTableRow = (row: TreeTableBody): JSX.Element => {
],
);

const date = row.date.split('T')[0] ?? '';
const time = row.date.split('T')[1].split('.')[0] ?? '';
const dateObj = new Date(row.date);
const date = dateObj.toLocaleDateString();
const time = dateObj.toLocaleTimeString();

return (
<TableRow>
Expand Down

0 comments on commit ee0fb47

Please sign in to comment.