ChatPage: fix height on mobile (where ThumbNavigation is present)
This commit is contained in:
parent
3c9ffd30b1
commit
c8adde735f
|
@ -21,7 +21,10 @@ const ChatPage = () => {
|
|||
const { top } = containerRef.current.getBoundingClientRect();
|
||||
const fullHeight = document.body.offsetHeight;
|
||||
|
||||
setHeight(fullHeight - top);
|
||||
// On mobile, account for bottom navigation.
|
||||
const offset = document.body.clientWidth < 976 ? -61 : 0;
|
||||
|
||||
setHeight(fullHeight - top + offset);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||
/** Custom layout for chats on desktop. */
|
||||
const ChatsPage: React.FC = ({ children }) => {
|
||||
return (
|
||||
<div className='md:col-span-12 lg:col-span-9 pb-16 sm:pb-0'>
|
||||
<div className='md:col-span-12 lg:col-span-9'>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue