chore: add tooltip to show full time on activity logs (#2235)

This commit is contained in:
Aaryan Khandelwal 2023-09-26 13:10:28 +05:30 committed by GitHub
parent 1ad99873a9
commit 6d3bd78052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,9 +7,9 @@ import { useRouter } from "next/router";
import { ActivityIcon, ActivityMessage } from "components/core"; import { ActivityIcon, ActivityMessage } from "components/core";
import { CommentCard } from "components/issues/comment"; import { CommentCard } from "components/issues/comment";
// ui // ui
import { Icon, Loader } from "components/ui"; import { Icon, Loader, Tooltip } from "components/ui";
// helpers // helpers
import { timeAgo } from "helpers/date-time.helper"; import { render24HourFormatTime, renderLongDateFormat, timeAgo } from "helpers/date-time.helper";
// types // types
import { IIssueActivity, IIssueComment } from "types"; import { IIssueActivity, IIssueComment } from "types";
@ -120,9 +120,15 @@ export const IssueActivitySection: React.FC<Props> = ({
</Link> </Link>
)}{" "} )}{" "}
{message}{" "} {message}{" "}
<Tooltip
tooltipContent={`${renderLongDateFormat(
activityItem.created_at
)}, ${render24HourFormatTime(activityItem.created_at)}`}
>
<span className="whitespace-nowrap"> <span className="whitespace-nowrap">
{timeAgo(activityItem.created_at)} {timeAgo(activityItem.created_at)}
</span> </span>
</Tooltip>
</div> </div>
</div> </div>
</div> </div>