Skip to content

Commit

Permalink
add formattedDateTime to ObjectListtable
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Apr 10, 2024
1 parent 7212839 commit 0c5ccf5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/react/databrowser/objects/ObjectListTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AutoSizer } from 'react-virtualized';
import { FixedSizeList } from 'react-window';
import InfiniteLoader from 'react-window-infinite-loader';
import { List } from 'immutable';
import { PrettyBytes, Text } from '@scality/core-ui';
import { FormattedDateTime, PrettyBytes, Text } from '@scality/core-ui';
import { convertRemToPixels } from '@scality/core-ui/dist/utils';
import { spacing } from '@scality/core-ui/dist/style/theme';
import styled from 'styled-components';
Expand Down Expand Up @@ -271,6 +271,15 @@ export default function ObjectListTable({
headerStyle: {
textAlign: 'right',
},
Cell: ({ value }) => {
return (
<FormattedDateTime
format="date-time-second"
value={new Date(value)}
/>
);
},

cellStyle: {
textAlign: 'right',
},
Expand Down

0 comments on commit 0c5ccf5

Please sign in to comment.