diff --git a/client/src/pages/Projects/components/Project/TasksListItem.tsx b/client/src/pages/Projects/components/Project/TasksListItem.tsx index 917ac71..ac2eabf 100644 --- a/client/src/pages/Projects/components/Project/TasksListItem.tsx +++ b/client/src/pages/Projects/components/Project/TasksListItem.tsx @@ -4,15 +4,17 @@ import { IconButton, ListItem, ListItemAvatar, - ListItemText + ListItemText, + Tooltip, } from "@mui/material"; import { useState } from "react"; +import { formatDate } from "../../../../utils/formatDate"; export type Task = { id: number; description: string; - createdAt: Date; - finishedAt?: Date; + createdAt: string; + finishedAt?: string; }; export type TasksListItemProps = { @@ -42,19 +44,38 @@ export const TasksListItem = ({ const blockInteration = finished || isLoading; return ( - - - - ) - } + - - - - - + + + + ) + } + > + + + + + + ); }; diff --git a/client/src/utils/formatDate.ts b/client/src/utils/formatDate.ts new file mode 100644 index 0000000..353dcc8 --- /dev/null +++ b/client/src/utils/formatDate.ts @@ -0,0 +1,7 @@ +export const formatDate = (date: string) => { + return ( + new Date(date).toLocaleDateString() + + " " + + new Date(date).toLocaleTimeString() + ); +};