diff --git a/apps/app/components/issues/activity.tsx b/apps/app/components/issues/activity.tsx index 617b3526635..58808d8a196 100644 --- a/apps/app/components/issues/activity.tsx +++ b/apps/app/components/issues/activity.tsx @@ -6,8 +6,6 @@ import useSWR from "swr"; // services import issuesService from "services/issues.service"; -// hooks -import useEstimateOption from "hooks/use-estimate-option"; // components import { CommentCard } from "components/issues/comment"; // ui @@ -17,88 +15,288 @@ import { Squares2X2Icon } from "@heroicons/react/24/outline"; import { BlockedIcon, BlockerIcon } from "components/icons"; // helpers import { renderShortDateWithYearFormat, timeAgo } from "helpers/date-time.helper"; -import { addSpaceIfCamelCase } from "helpers/string.helper"; +import { capitalizeFirstLetter } from "helpers/string.helper"; // types -import { ICurrentUserResponse, IIssueComment, IIssueLabels } from "types"; +import { ICurrentUserResponse, IIssueActivity, IIssueComment } from "types"; // fetch-keys -import { PROJECT_ISSUES_ACTIVITY, PROJECT_ISSUE_LABELS } from "constants/fetch-keys"; +import { PROJECT_ISSUES_ACTIVITY } from "constants/fetch-keys"; const activityDetails: { [key: string]: { - message?: string; - icon: JSX.Element; + message: (activity: IIssueActivity) => React.ReactNode; + icon: React.ReactNode; }; } = { assignee: { - message: "removed the assignee", + message: (activity) => ( + <> + removed the assignee{" "} + {activity.old_value}. + + ), icon: