- {canReviewClosedRequest && (
- <>
-
-
- >
- )}
{isSourceAccepted && (
{t("external_contours_page.traceability.source_decision_accepted")}
)}
-
}
- customButtonClassName={getIconButtonStyling("secondary", "lg")}
- placement="bottom-start"
- >
-
-
-
- {t("external_contours_page.actions.copy")}
-
-
- {hasDirectTargetAccess && (
-
router.push(workItemLink)}>
-
-
- {t("external_contours_page.actions.open")}
-
-
- )}
-
+
handleDecision("accept")}
+ onCopy={handleCopyLink}
+ onDecline={() => setIsDeclineModalOpen(true)}
+ onOpenTarget={handleOpenTarget}
+ onToggleSubscription={handleToggleSubscription}
+ />
diff --git a/plane-src/apps/web/ce/components/projects/external-contours/subscription.tsx b/plane-src/apps/web/ce/components/projects/external-contours/subscription.tsx
index d3f916f..7688077 100644
--- a/plane-src/apps/web/ce/components/projects/external-contours/subscription.tsx
+++ b/plane-src/apps/web/ce/components/projects/external-contours/subscription.tsx
@@ -16,16 +16,17 @@ import { IssueService } from "@/services/issue/issue.service";
const issueService = new IssueService();
-type Props = {
+type TSubscriptionIdentity = {
workspaceSlug: string;
projectId: string;
issueId: string;
+};
+
+type Props = TSubscriptionIdentity & {
buttonClassName?: string;
};
-export const ExternalContourSubscription = observer(function ExternalContourSubscription(props: Props) {
- const { workspaceSlug, projectId, issueId, buttonClassName } = props;
- const { t } = useTranslation();
+export const useExternalContourSubscription = ({ workspaceSlug, projectId, issueId }: TSubscriptionIdentity) => {
const [isSubscribed, setIsSubscribed] = useState