import { FC, ReactNode } from "react"; import { Network } from "lucide-react"; // hooks import { Tooltip } from "@plane/ui"; import { renderFormattedTime, renderFormattedDate, calculateTimeAgo } from "helpers/date-time.helper"; import { useIssueDetail } from "hooks/store"; import { usePlatformOS } from "hooks/use-platform-os"; // ui // components import { IssueUser } from "../"; // helpers 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); const { isMobile } = usePlatformOS(); if (!activity) return <>; return (
{icon ? icon : }
{children} {calculateTimeAgo(activity.created_at)}
); };