import React from "react"; import { useRouter } from "next/router"; import useSWR from "swr"; // services import issuesService from "services/issues.service"; // components import { CommentCard } from "components/issues/comment"; // ui import { Icon, Loader } from "components/ui"; // icons import { Squares2X2Icon } from "@heroicons/react/24/outline"; import { BlockedIcon, BlockerIcon } from "components/icons"; // helpers import { renderShortDateWithYearFormat, timeAgo } from "helpers/date-time.helper"; import { capitalizeFirstLetter } from "helpers/string.helper"; // types import { ICurrentUserResponse, IIssueActivity, IIssueComment } from "types"; // fetch-keys import { PROJECT_ISSUES_ACTIVITY } from "constants/fetch-keys"; const activityDetails: { [key: string]: { message: (activity: IIssueActivity) => React.ReactNode; icon: React.ReactNode; }; } = { assignees: { message: (activity) => { if (activity.old_value === "") return ( <> added a new assignee{" "} {activity.new_value}. ); else return ( <> removed the assignee{" "} {activity.old_value}. ); }, icon: