Skip to content

Commit 354290f

Browse files
Merge pull request #206 from Sandeep-kumar-Ramesh/filetype_error
Created at date formatted
2 parents 638e49a + 064095b commit 354290f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Project/frontend/src/components/Graph_page/GraphInfoPanel.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ const GraphInfoPanel: React.FC<GraphInfoPanelProps> = ({
5757
searchIsLoading,
5858
fileId,
5959
}) => {
60+
61+
const formatdateTime = () => {
62+
const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' };
63+
const date = new Date(graphData.graph_created_at).toLocaleDateString('UTC', options);
64+
return date;
65+
}
66+
6067
return (
6168
<Drawer
6269
sx={{
@@ -87,7 +94,7 @@ const GraphInfoPanel: React.FC<GraphInfoPanelProps> = ({
8794
<Divider sx={{ my: 1 }} />
8895
<Typography variant="subtitle1">Created At</Typography>
8996
<Typography variant="body2" color="text.secondary">
90-
{graphData.graph_created_at}
97+
{formatdateTime()}
9198
</Typography>
9299
</CardContent>
93100
</Card>

0 commit comments

Comments
 (0)