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