import React from "react"; import Link from "next/link"; import { useRouter } from "next/router"; // components import { ActivityIcon, ActivityMessage } from "components/core"; import { CommentCard } from "components/issues/comment"; // ui import { Loader, Tooltip } from "@plane/ui"; // helpers import { render24HourFormatTime, renderLongDateFormat, timeAgo } from "helpers/date-time.helper"; // types import { IIssueActivity, IIssueComment } from "types"; import { History } from "lucide-react"; type Props = { activity: IIssueActivity[] | undefined; handleCommentUpdate: (commentId: string, data: Partial) => Promise; handleCommentDelete: (commentId: string) => Promise; showAccessSpecifier?: boolean; }; export const IssueActivitySection: React.FC = ({ activity, handleCommentUpdate, handleCommentDelete, showAccessSpecifier = false, }) => { const router = useRouter(); const { workspaceSlug } = router.query; if (!activity) return (
); return (
    {activity.map((activityItem, index) => { // determines what type of action is performed const message = activityItem.field ? : "created the issue."; if ("field" in activityItem && activityItem.field !== "updated_by") { return (
  • {activity.length > 1 && index !== activity.length - 1 ? (
  • ); } else if ("comment_json" in activityItem) return (
    ); })}
); };