Feed feedback and fixes #231

Merged
enes merged 22 commits from feat/131-feed-issues into staging 2025-02-21 14:06:33 +00:00
2 changed files with 10 additions and 4 deletions
Showing only changes of commit db5b2d0a9c - Show all commits

View File

@ -21,9 +21,9 @@ export const CommentContent = ({ content }: CommentContentProps) => {
<p className='IBMSMSMBSSCL_CBText'>
<NoteRender content={text} />
</p>
{isTextOverflowing && (
{isTextOverflowing && !isExpanded && (
<div className='IBMSMSMBSSCL_CBExpand' onClick={toggle}>
<p>{isExpanded ? 'Hide' : 'View'} full post</p>
<p>View full post</p>
</div>
)}
</>

View File

@ -2,10 +2,16 @@ import { useEffect } from 'react'
export const useBodyScrollDisable = (disable: boolean) => {
useEffect(() => {
if (disable) document.body.style.overflow = 'hidden'
const initialOverflow = document.body.style.overflow
if (disable && initialOverflow !== 'hidden') {
document.body.style.overflow = 'hidden'
}
return () => {
document.body.style.overflow = ''
if (initialOverflow !== 'hidden') {
document.body.style.overflow = initialOverflow
}
}
}, [disable])
}