mirror of
https://github.com/plebbit/seedit.git
synced 2026-04-22 16:18:08 -04:00
fix(post): fix virtuoso zero-sized element error
This commit is contained in:
@@ -213,4 +213,12 @@
|
||||
font-weight: bold;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* 1px compromise to hide removed posts immediately, before the feed updates, while avoiding virtuoso's zero-sized element error */
|
||||
.minimalHeight {
|
||||
visibility: hidden;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 1px;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ const Post = ({ post = {}, index }: PostProps) => {
|
||||
const { blocked, unblock } = useBlock({ address: cid });
|
||||
|
||||
return (
|
||||
<div className={`${styles.content} ${removed ? styles.hidden : styles.visible}`} key={index}>
|
||||
<div className={`${styles.content} ${removed ? styles.minimalHeight : ''}`} key={index}>
|
||||
<div className={`${styles.hiddenPost} ${blocked ? styles.visible : styles.hidden}`}>
|
||||
<div className={styles.hiddenPostText}>{t('post_hidden').charAt(0).toUpperCase() + t('post_hidden').slice(1)}</div>
|
||||
<div className={styles.undoHiddenPost} onClick={unblock}>
|
||||
|
||||
Reference in New Issue
Block a user