mirror of
https://github.com/makeplane/plane.git
synced 2025-12-16 11:57:56 +01:00
fix: refactor
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
import { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
|
||||
export type TIssuePageActivity = { activityId: string; showIssue?: boolean; ends: "top" | "bottom" | undefined };
|
||||
export type TIssuePageActivity = { activityId: string; showIssue?: boolean; ends?: "top" | "bottom" | undefined };
|
||||
|
||||
export const IssuePageActivity: FC<TIssuePageActivity> = observer(() => <></>);
|
||||
|
||||
@@ -15,3 +15,5 @@ export const shouldShowConnector = (notificationField: string | undefined) =>
|
||||
!["comment", "archived_at", "None", "assignees", "labels", "start_date", "target_date", "parent"].includes(
|
||||
notificationField || ""
|
||||
);
|
||||
|
||||
export const shouldRender = (notificationField: string | undefined, verb: string | undefined) => verb !== "deleted";
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import { FC } from "react";
|
||||
import {
|
||||
renderAdditionalAction,
|
||||
renderAdditionalValue,
|
||||
shouldShowConnector,
|
||||
} from "ee/components/workspace-notifications";
|
||||
|
||||
import { TNotification } from "@plane/types";
|
||||
import {
|
||||
convertMinutesToHoursMinutesString,
|
||||
@@ -14,6 +10,12 @@ import {
|
||||
} from "@plane/utils";
|
||||
// components
|
||||
import { LiteTextEditor } from "@/components/editor/lite-text";
|
||||
import {
|
||||
renderAdditionalAction,
|
||||
renderAdditionalValue,
|
||||
shouldShowConnector,
|
||||
shouldRender,
|
||||
} from "@/plane-web/components/workspace-notifications";
|
||||
|
||||
export const NotificationContent: FC<{
|
||||
notification: TNotification;
|
||||
@@ -86,7 +88,7 @@ export const NotificationContent: FC<{
|
||||
<>
|
||||
{renderTriggerName()}
|
||||
<span className="text-custom-text-300">{renderAction()} </span>
|
||||
{verb !== "deleted" && (
|
||||
{shouldRender(notificationField, verb) && (
|
||||
<>
|
||||
{shouldShowConnector(notificationField) && <span className="text-custom-text-300">to </span>}
|
||||
<span className="text-custom-text-100 font-medium">{renderValue()}</span>
|
||||
|
||||
Reference in New Issue
Block a user