From 5bc905b35828ad880a296c4164290c439f6afdce Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Wed, 3 Aug 2022 16:42:51 -0600 Subject: [PATCH] Bottom padding works on mobile, broken on desktop :( --- web/components/groups/group-chat.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/components/groups/group-chat.tsx b/web/components/groups/group-chat.tsx index dc350cc0..2b5bd6e1 100644 --- a/web/components/groups/group-chat.tsx +++ b/web/components/groups/group-chat.tsx @@ -50,8 +50,9 @@ export function GroupChat(props: { const { width, height } = useWindowSize() const [containerRef, setContainerRef] = useState(null) // Subtract bottom bar when it's showing (less than lg screen) - // const bottomBarHeight = (width ?? 0) < 1024 ? 58 : 0 - const remainingHeight = (height ?? 0) - (containerRef?.offsetTop ?? 0) + const bottomBarHeight = (width ?? 0) < 1024 ? 58 : 0 + const remainingHeight = + (height ?? 0) - (containerRef?.offsetTop ?? 0) - bottomBarHeight useMemo(() => { // Group messages with createdTime within 2 minutes of each other.