aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-15 21:19:02 +0800
committercrupest <crupest@outlook.com>2021-06-15 21:19:02 +0800
commit1552c0086c396aa89e0ad965a6cbd6c3ea70cac4 (patch)
tree2347d15102711f8dc917dfd6e1888fc1527c5c64 /FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx
parentc442bec1342a16ddfdb8e103f9b238e4581639e2 (diff)
downloadtimeline-1552c0086c396aa89e0ad965a6cbd6c3ea70cac4.tar.gz
timeline-1552c0086c396aa89e0ad965a6cbd6c3ea70cac4.tar.bz2
timeline-1552c0086c396aa89e0ad965a6cbd6c3ea70cac4.zip
...
Diffstat (limited to 'FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx')
-rw-r--r--FrontEnd/src/views/timeline-common/TimelinePageTemplate.tsx38
1 files changed, 1 insertions, 37 deletions
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}
</>
);
};