Remove wrapper markup from comment replies list
This commit is contained in:
parent
8017e34110
commit
adf1c01b9d
|
@ -116,22 +116,9 @@ export function CommentRepliesList(props: {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{comments.map((comment, commentIdx) => (
|
{comments.map((comment, commentIdx) => (
|
||||||
<div
|
|
||||||
key={comment.id}
|
|
||||||
id={comment.id}
|
|
||||||
className={clsx(
|
|
||||||
'relative',
|
|
||||||
!treatFirstIndexEqually && commentIdx === 0 ? '' : 'ml-6'
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{/*draw a gray line from the comment to the left:*/}
|
|
||||||
{(treatFirstIndexEqually || commentIdx != 0) && (
|
|
||||||
<span
|
|
||||||
className="absolute -ml-[1px] mt-[0.8rem] h-2 w-0.5 rotate-90 bg-gray-200"
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<FeedComment
|
<FeedComment
|
||||||
|
key={comment.id}
|
||||||
|
indent={treatFirstIndexEqually || commentIdx != 0}
|
||||||
contract={contract}
|
contract={contract}
|
||||||
comment={comment}
|
comment={comment}
|
||||||
tips={tips[comment.id]}
|
tips={tips[comment.id]}
|
||||||
|
@ -148,7 +135,6 @@ export function CommentRepliesList(props: {
|
||||||
}
|
}
|
||||||
smallAvatar={smallAvatar}
|
smallAvatar={smallAvatar}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -159,6 +145,7 @@ export function FeedComment(props: {
|
||||||
comment: ContractComment
|
comment: ContractComment
|
||||||
tips: CommentTips
|
tips: CommentTips
|
||||||
betsBySameUser: Bet[]
|
betsBySameUser: Bet[]
|
||||||
|
indent?: boolean
|
||||||
probAtCreatedTime?: number
|
probAtCreatedTime?: number
|
||||||
smallAvatar?: boolean
|
smallAvatar?: boolean
|
||||||
onReplyClick?: (comment: ContractComment) => void
|
onReplyClick?: (comment: ContractComment) => void
|
||||||
|
@ -168,6 +155,7 @@ export function FeedComment(props: {
|
||||||
comment,
|
comment,
|
||||||
tips,
|
tips,
|
||||||
betsBySameUser,
|
betsBySameUser,
|
||||||
|
indent,
|
||||||
probAtCreatedTime,
|
probAtCreatedTime,
|
||||||
onReplyClick,
|
onReplyClick,
|
||||||
} = props
|
} = props
|
||||||
|
@ -202,10 +190,18 @@ export function FeedComment(props: {
|
||||||
return (
|
return (
|
||||||
<Row
|
<Row
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'flex space-x-1.5 sm:space-x-3',
|
'relative flex space-x-1.5 sm:space-x-3',
|
||||||
|
indent ? 'ml-6' : '',
|
||||||
highlighted ? `-m-1 rounded bg-indigo-500/[0.2] p-2` : ''
|
highlighted ? `-m-1 rounded bg-indigo-500/[0.2] p-2` : ''
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
{/*draw a gray line from the comment to the left:*/}
|
||||||
|
{indent ? (
|
||||||
|
<span
|
||||||
|
className="absolute -ml-[1px] mt-[0.8rem] h-2 w-0.5 rotate-90 bg-gray-200"
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
<Avatar
|
<Avatar
|
||||||
className={'ml-1'}
|
className={'ml-1'}
|
||||||
size={'sm'}
|
size={'sm'}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user