From ad61f58644b3f0fac451dbc5b869471edcad0cf4 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sat, 20 Feb 2021 22:45:07 +0800
Subject: ...

---
 FrontEnd/src/app/views/user/UserCard.tsx | 26 +++++++-------------------
 1 file changed, 7 insertions(+), 19 deletions(-)

(limited to 'FrontEnd/src/app/views/user/UserCard.tsx')

diff --git a/FrontEnd/src/app/views/user/UserCard.tsx b/FrontEnd/src/app/views/user/UserCard.tsx
index b2c94457..552f5ced 100644
--- a/FrontEnd/src/app/views/user/UserCard.tsx
+++ b/FrontEnd/src/app/views/user/UserCard.tsx
@@ -1,8 +1,6 @@
 import React from "react";
 
-import TimelinePageCardTemplate, {
-  TimelineCardTemplateProps,
-} from "../timeline-common/TimelinePageCardTemplate";
+import TimelinePageCardTemplate from "../timeline-common/TimelinePageCardTemplate";
 import { TimelinePageCardProps } from "../timeline-common/TimelinePageTemplate";
 import UserAvatar from "../common/user/UserAvatar";
 
@@ -31,27 +29,17 @@ const UserCard: React.FC<TimelinePageCardProps> = (props) => {
             </div>
           </>
         }
-        manageArea={((): TimelineCardTemplateProps["manageArea"] => {
-          if (!timeline.manageable) {
-            return { type: "member" };
-          } else {
-            return {
-              type: "manage",
-              items: [
+        manageItems={
+          timeline.manageable
+            ? [
                 {
                   type: "button",
                   text: "timeline.manageItem.property",
                   onClick: () => setDialog("property"),
                 },
-                {
-                  type: "button",
-                  text: "timeline.manageItem.member",
-                  onClick: () => setDialog("member"),
-                },
-              ],
-            };
-          }
-        })()}
+              ]
+            : undefined
+        }
         dialog={dialog}
         setDialog={setDialog}
         {...props}
-- 
cgit v1.2.3

