From 1552c0086c396aa89e0ad965a6cbd6c3ea70cac4 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Tue, 15 Jun 2021 21:19:02 +0800
Subject: ...

---
 .../views/timeline-common/TimelinePageTemplate.tsx | 38 +---------------------
 1 file changed, 1 insertion(+), 37 deletions(-)

(limited to 'FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx')

diff --git a/FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx b/FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx
index 658ce502..9b9ebbc2 100644
--- a/FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx
+++ b/FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx
@@ -87,29 +87,12 @@ const TimelinePageTemplate: React.FC<TimelinePageTemplateProps> = (props) => {
     }
   }, [timeline]);
 
-  const [bottomSpaceHeight, setBottomSpaceHeight] = React.useState<number>(0);
-
   const [timelineReloadKey, setTimelineReloadKey] = React.useState<number>(0);
 
   const reloadTimeline = (): void => {
     setTimelineReloadKey((old) => old + 1);
   };
 
-  const onPostEditHeightChange = React.useCallback((height: number): void => {
-    setBottomSpaceHeight(height);
-    if (height === 0) {
-      const alertHost = getAlertHost();
-      if (alertHost != null) {
-        alertHost.style.removeProperty("margin-bottom");
-      }
-    } else {
-      const alertHost = getAlertHost();
-      if (alertHost != null) {
-        alertHost.style.marginBottom = `${height}px`;
-      }
-    }
-  }, []);
-
   const cardCollapseLocalStorageKey = `timeline.${timelineName}.cardCollapse`;
 
   const [cardCollapse, setCardCollapse] = React.useState<boolean>(true);
@@ -142,12 +125,7 @@ const TimelinePageTemplate: React.FC<TimelinePageTemplateProps> = (props) => {
           connectionStatus={connectionStatus}
         />
       ) : null}
-      <Container
-        className="px-0"
-        style={{
-          minHeight: `calc(100vh - ${56 + bottomSpaceHeight}px)`,
-        }}
-      >
+      <Container className="px-0">
         {(() => {
           if (state === "offline") {
             // TODO: i18n
@@ -169,20 +147,6 @@ const TimelinePageTemplate: React.FC<TimelinePageTemplateProps> = (props) => {
           }
         })()}
       </Container>
-      {timeline != null && timeline.postable ? (
-        <>
-          <div
-            style={{ height: bottomSpaceHeight }}
-            className="flex-fix-length"
-          />
-          <TimelinePostEdit
-            className="fixed-bottom"
-            timeline={timeline}
-            onHeightChange={onPostEditHeightChange}
-            onPosted={reloadTimeline}
-          />
-        </>
-      ) : null}
     </>
   );
 };
-- 
cgit v1.2.3

