diff --git a/apps/app/components/core/activity.tsx b/apps/app/components/core/activity.tsx
index 7ddf9c33c..91f22d01e 100644
--- a/apps/app/components/core/activity.tsx
+++ b/apps/app/components/core/activity.tsx
@@ -53,7 +53,11 @@ const UserLink = ({ activity }: { activity: IIssueActivity }) => {
const activityDetails: {
[key: string]: {
- message: (activity: IIssueActivity, showIssue: boolean) => React.ReactNode;
+ message: (
+ activity: IIssueActivity,
+ showIssue: boolean,
+ backgroundColor?: string
+ ) => React.ReactNode;
icon: React.ReactNode;
};
} = {
@@ -253,7 +257,7 @@ const activityDetails: {
icon: ,
},
labels: {
- message: (activity, showIssue) => {
+ message: (activity, showIssue, backgroundColor = "#000000") => {
if (activity.old_value === "")
return (
<>
@@ -262,7 +266,7 @@ const activityDetails: {
@@ -532,14 +536,26 @@ export const ActivityIcon = ({ activity }: { activity: IIssueActivity }) => (
<>{activityDetails[activity.field as keyof typeof activityDetails]?.icon}>
);
-export const ActivityMessage = ({
- activity,
- showIssue = false,
-}: {
+type ActivityMessageProps = {
activity: IIssueActivity;
showIssue?: boolean;
-}) => (
- <>
- {activityDetails[activity.field as keyof typeof activityDetails]?.message(activity, showIssue)}
- >
-);
+};
+
+import { observer } from "mobx-react-lite";
+import { useMobxStore } from "lib/mobx/store-provider";
+
+export const ActivityMessage = observer(({ activity, showIssue = false }: ActivityMessageProps) => {
+ const {
+ label: { getLabelById },
+ } = useMobxStore();
+
+ return (
+ <>
+ {activityDetails[activity.field as keyof typeof activityDetails]?.message(
+ activity,
+ showIssue,
+ activity.field === "labels" ? getLabelById(activity?.new_identifier!)?.color : undefined
+ )}
+ >
+ );
+});