From d8b8c903f212f54aed82b1cbcddae8da4363ff53 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Fri, 25 Aug 2023 12:21:11 +0530 Subject: [PATCH] fix: issue activity redirection to cycle and module (#1973) Co-authored-by: Aaryan Khandelwal --- apps/app/components/core/activity.tsx | 89 ++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 14 deletions(-) diff --git a/apps/app/components/core/activity.tsx b/apps/app/components/core/activity.tsx index 7ddf9c33c..1b9de8d25 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, + workspaceSlug: string + ) => React.ReactNode; icon: React.ReactNode; }; } = { @@ -173,26 +177,50 @@ const activityDetails: { icon: , }, cycles: { - message: (activity) => { + message: (activity, showIssue, workspaceSlug) => { if (activity.verb === "created") return ( <> added this issue to the cycle{" "} - {activity.new_value}. + + {activity.new_value} + + ); else if (activity.verb === "updated") return ( <> set the cycle to{" "} - {activity.new_value}. + + {activity.new_value} + + ); else return ( <> removed the issue from the cycle{" "} - {activity.old_value}. + + {activity.old_value} + + ); }, @@ -351,26 +379,50 @@ const activityDetails: { icon: