+ {issueActivities.length > 1 && activityItemIdx !== issueActivities.length - 1 ? (
) : null}
- {activity.field ? (
-
-
- {activityDetails[activity.field as keyof typeof activityDetails]?.icon}
-
-
- ) : (
-
-
- {activity.actor_detail.avatar && activity.actor_detail.avatar !== "" ? (
-
- ) : (
-
- {activity.actor_detail.first_name.charAt(0)}
+
+ <>
+
+
+
+
+ {activityItem.field ? (
+ activityDetails[activityItem.field as keyof typeof activityDetails]
+ ?.icon
+ ) : activityItem.actor_detail.avatar &&
+ activityItem.actor_detail.avatar !== "" ? (
+
+ ) : (
+
+ {activityItem.actor_detail.first_name.charAt(0)}
+
+ )}
+
- )}
+
-
- )}
-
-
-
-
- {activity.actor_detail.first_name}
- {activity.actor_detail.is_bot
- ? " Bot"
- : " " + activity.actor_detail.last_name}
-
-
- {" "}
- {activity.field === "labels"
- ? activity.new_value !== ""
- ? "added a new label"
- : "removed the label"
- : activity.field === "blocking"
- ? activity.new_value !== ""
- ? "marked this issue is blocking"
- : "removed the issue from blocking"
- : activity.field === "blocks"
- ? activity.new_value !== ""
- ? "marked this issue being blocked by"
- : "removed blocker"
- : activity.field === "target_date"
- ? activity.new_value && activity.new_value !== ""
- ? "set the due date to"
- : "removed the due date"
- : activityDetails[activity.field as keyof typeof activityDetails]
- ?.message}{" "}
-
-
- {activity.verb === "created" &&
- activity.field !== "cycles" &&
- activity.field !== "modules" ? (
- created this issue.
- ) : activity.field === "description" ? null : activity.field === "state" ? (
- activity.new_value ? (
- addSpaceIfCamelCase(activity.new_value)
- ) : (
- "None"
- )
- ) : activity.field === "labels" ||
- activity.field === "blocking" ||
- activity.field === "blocks" ? (
- activity.new_value !== "" ? (
- activity.new_value
- ) : (
- activity.old_value
- )
- ) : activity.field === "assignee" ? (
- activity.old_value
- ) : activity.field === "target_date" ? (
- activity.new_value ? (
- renderShortNumericDateFormat(activity.new_value as string)
- ) : null
- ) : activity.field === "description" ? (
- ""
- ) : (
- activity.new_value ?? "None"
- )}
-
- {timeAgo(activity.created_at)}
-
+
+
+
+ {activityItem.actor_detail.first_name}
+ {activityItem.actor_detail.is_bot
+ ? " Bot"
+ : " " + activityItem.actor_detail.last_name}
+
+ {action}
+ {value}
+
+ {timeAgo(activityItem.created_at)}
+
+
+
+ >
- );
- } else if ("comment_json" in activity)
- return (
-
- );
- })}
-
- ) : (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )}
- >
+
+ );
+ } else if ("comment_json" in activityItem)
+ return (
+
+ );
+ })}
+
+
);
};
diff --git a/apps/app/components/issues/comment/comment-card.tsx b/apps/app/components/issues/comment/comment-card.tsx
index 936d2b6b6..9cab65531 100644
--- a/apps/app/components/issues/comment/comment-card.tsx
+++ b/apps/app/components/issues/comment/comment-card.tsx
@@ -6,7 +6,7 @@ import dynamic from "next/dynamic";
// react-hook-form
import { useForm } from "react-hook-form";
// icons
-import { CheckIcon, XMarkIcon } from "@heroicons/react/24/outline";
+import { ChatBubbleLeftEllipsisIcon, CheckIcon, XMarkIcon } from "@heroicons/react/24/outline";
// hooks
import useUser from "hooks/use-user";
// ui
@@ -49,71 +49,77 @@ export const CommentCard: React.FC
= ({ comment, onSubmit, handleCommentD
}, [isEditing, setFocus]);
return (
-
-
-
- {comment.actor_detail.avatar && comment.actor_detail.avatar !== "" ? (
-
- ) : (
-
- {comment.actor_detail.first_name.charAt(0)}
-
- )}
-
-
-
-
- {comment.actor_detail.first_name}
- {comment.actor_detail.is_bot ? "Bot" : " " + comment.actor_detail.last_name}
-
- {timeAgo(comment.created_at)}
-
-
- {isEditing ? (
-
- ) : (
- <>
-
({})}
- />
- >
- )}
+
+
+ {comment.actor_detail.avatar && comment.actor_detail.avatar !== "" ? (
+
+ ) : (
+
+ {comment.actor_detail.first_name.charAt(0)}
+ )}
+
+
+
+
+
+
+
+
+ {comment.actor_detail.first_name}
+ {comment.actor_detail.is_bot ? "Bot" : " " + comment.actor_detail.last_name}
+
+
Commented {timeAgo(comment.created_at)}
+
+
+ {isEditing ? (
+
+ ) : (
+ //
+
({})}
+ noBorder
+ customClassName="text-xs bg-gray-100"
+ />
+ )}
{user?.id === comment.actor && (