diff --git a/web/components/web-view/activity-message.tsx b/web/components/web-view/activity-message.tsx new file mode 100644 index 000000000..956dfb904 --- /dev/null +++ b/web/components/web-view/activity-message.tsx @@ -0,0 +1,419 @@ +import { useRouter } from "next/router"; + +// icons +import { Icon, Tooltip } from "components/ui"; +import { Squares2X2Icon } from "@heroicons/react/24/outline"; +import { BlockedIcon, BlockerIcon } from "components/icons"; +// helpers +import { renderShortDateWithYearFormat } from "helpers/date-time.helper"; +import { capitalizeFirstLetter } from "helpers/string.helper"; +// types +import { IIssueActivity } from "types"; + +const IssueLink = ({ activity }: { activity: IIssueActivity }) => ( + + + +); + +const UserLink = ({ activity }: { activity: IIssueActivity }) => ( + +); + +const activityDetails: { + [key: string]: { + message: ( + activity: IIssueActivity, + showIssue: boolean, + workspaceSlug: string + ) => React.ReactNode; + icon: React.ReactNode; + }; +} = { + assignees: { + message: (activity, showIssue) => ( + <> + {activity.old_value === "" ? "added a new assignee " : "removed the assignee "} + + {showIssue && ( + <> + {" "} + to + + )} + . + + ), + icon: