From e1fd270f1806ffd51174c835b335ceb4ebb2fe56 Mon Sep 17 00:00:00 2001
From: Fawn <fangrui_tong@brown.edu>
Date: Wed, 12 Jun 2019 16:20:46 -0400
Subject: created remove handlers for link metadata and groups

---
 src/client/views/nodes/LinkBox.tsx | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

(limited to 'src/client/views/nodes/LinkBox.tsx')

diff --git a/src/client/views/nodes/LinkBox.tsx b/src/client/views/nodes/LinkBox.tsx
index ebca1dc69..5597bb1aa 100644
--- a/src/client/views/nodes/LinkBox.tsx
+++ b/src/client/views/nodes/LinkBox.tsx
@@ -41,23 +41,23 @@ export class LinkBox extends React.Component<Props> {
         this.props.showEditor();
     }
 
-    @action
-    onDeleteButtonPressed = async (e: React.PointerEvent): Promise<void> => {
-        e.stopPropagation();
-        const [linkedFrom, linkedTo] = await Promise.all([Cast(this.props.linkDoc.linkedFrom, Doc), Cast(this.props.linkDoc.linkedTo, Doc)]);
-        if (linkedFrom) {
-            const linkedToDocs = Cast(linkedFrom.linkedToDocs, listSpec(Doc));
-            if (linkedToDocs) {
-                linkedToDocs.splice(linkedToDocs.indexOf(this.props.linkDoc), 1);
-            }
-        }
-        if (linkedTo) {
-            const linkedFromDocs = Cast(linkedTo.linkedFromDocs, listSpec(Doc));
-            if (linkedFromDocs) {
-                linkedFromDocs.splice(linkedFromDocs.indexOf(this.props.linkDoc), 1);
-            }
-        }
-    }
+    // @action
+    // onDeleteButtonPressed = async (e: React.PointerEvent): Promise<void> => {
+    //     e.stopPropagation();
+    //     const [linkedFrom, linkedTo] = await Promise.all([Cast(this.props.linkDoc.linkedFrom, Doc), Cast(this.props.linkDoc.linkedTo, Doc)]);
+    //     if (linkedFrom) {
+    //         const linkedToDocs = Cast(linkedFrom.linkedToDocs, listSpec(Doc));
+    //         if (linkedToDocs) {
+    //             linkedToDocs.splice(linkedToDocs.indexOf(this.props.linkDoc), 1);
+    //         }
+    //     }
+    //     if (linkedTo) {
+    //         const linkedFromDocs = Cast(linkedTo.linkedFromDocs, listSpec(Doc));
+    //         if (linkedFromDocs) {
+    //             linkedFromDocs.splice(linkedFromDocs.indexOf(this.props.linkDoc), 1);
+    //         }
+    //     }
+    // }
 
     render() {
 
@@ -80,8 +80,8 @@ export class LinkBox extends React.Component<Props> {
                         <FontAwesomeIcon className="fa-icon" icon="arrow-right" size="sm" /></div>
                     <div title="Edit Link" className="button" onPointerDown={this.onEditButtonPressed}>
                         <FontAwesomeIcon className="fa-icon" icon="edit" size="sm" /></div>
-                    <div title="Delete Link" className="button" onPointerDown={this.onDeleteButtonPressed}>
-                        <FontAwesomeIcon className="fa-icon" icon="times" size="sm" /></div>
+                    {/* <div title="Delete Link" className="button" onPointerDown={this.onDeleteButtonPressed}>
+                        <FontAwesomeIcon className="fa-icon" icon="times" size="sm" /></div> */}
                 </div>
             </div>
         );
-- 
cgit v1.2.3-70-g09d2

