1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

fixed image attachments on SSR

This commit is contained in:
Fedor Katurov 2022-11-23 14:31:00 +06:00
parent 2e88b79d67
commit e2d870f187

View file

@ -70,8 +70,15 @@ const CommentContent: FC<IProps> = memo(
}, [comment, onDelete]); }, [comment, onDelete]);
const menu = useMemo( const menu = useMemo(
() => () => (
canEdit && <CommentMenu onDelete={onLockClick} onEdit={startEditing} />, <div>
{canEdit && (
<Authorized>
<CommentMenu onDelete={onLockClick} onEdit={startEditing} />
</Authorized>
)}
</div>
),
[canEdit, startEditing, onLockClick], [canEdit, startEditing, onLockClick],
); );
@ -97,9 +104,10 @@ const CommentContent: FC<IProps> = memo(
return ( return (
<div className={styles.wrap}> <div className={styles.wrap}>
{!!prefix && <div className={styles.prefix}>{prefix}</div>} {!!prefix && <div className={styles.prefix}>{prefix}</div>}
{comment.text.trim() && ( {comment.text.trim() && (
<Group className={classnames(styles.block, styles.block_text)}> <Group className={classnames(styles.block, styles.block_text)}>
<Authorized>{menu}</Authorized> {menu}
<Group className={styles.renderers}> <Group className={styles.renderers}>
{blocks.map( {blocks.map(