import { FC, ReactNode } from "react"; import { Network } from "lucide-react"; // hooks import { useIssueDetail } from "hooks/store"; // ui import { Tooltip } from "@plane/ui"; // components import { IssueUser } from "../"; // helpers import { renderFormattedTime, renderFormattedDate, calculateTimeAgo } from "helpers/date-time.helper"; type TIssueActivityBlockComponent = { icon?: ReactNode; activityId: string; ends: "top" | "bottom" | undefined; children: ReactNode; customUserName?: string; }; export const IssueActivityBlockComponent: FC = (props) => { const { icon, activityId, ends, children, customUserName } = props; // hooks const { activity: { getActivityById }, } = useIssueDetail(); const activity = getActivityById(activityId); if (!activity) return <>; return (
{icon ? icon : }
{children} {calculateTimeAgo(activity.created_at)}
); };