Skip to content

Commit

Permalink
fix: address incorrect conflict resolution so threads are scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric committed Oct 16, 2023
1 parent 02ab5d5 commit dc68027
Showing 1 changed file with 36 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,51 +35,47 @@ const InterpretationThread = ({

return (
<div className={cx('container', { fetching })}>
<div className={'scrollbox'}>
<div className={'title'}>
<IconClock16 color={colors.grey700} />
{moment(fromServerDate(interpretation.created)).format(
'LLL'
)}
</div>
{DownloadMenu && (
<DownloadMenu relativePeriodDate={interpretation.created} />
)}
<div className={'thread'}>
<Interpretation
currentUser={currentUser}
interpretation={interpretation}
onReplyIconClick={
interpretationAccess.comment
? () => focusRef.current?.focus()
: null
}
onUpdated={() => onThreadUpdated(true)}
onDeleted={onInterpretationDeleted}
isInThread={true}
/>
<div className={'comments'}>
{interpretation.comments.map((comment) => (
<Comment
key={comment.id}
comment={comment}
currentUser={currentUser}
interpretationId={interpretation.id}
onThreadUpdated={onThreadUpdated}
canComment={interpretationAccess.comment}
/>
))}
</div>
{interpretationAccess.comment && (
<CommentAddForm
<div className={'title'}>
<IconClock16 color={colors.grey700} />
{moment(fromServerDate(interpretation.created)).format('LLL')}
</div>
{DownloadMenu && (
<DownloadMenu relativePeriodDate={interpretation.created} />
)}
<div className={'thread'}>
<Interpretation
currentUser={currentUser}
interpretation={interpretation}
onReplyIconClick={
interpretationAccess.comment
? () => focusRef.current?.focus()
: null
}
onUpdated={() => onThreadUpdated(true)}
onDeleted={onInterpretationDeleted}
isInThread={true}
/>
<div className={'comments'}>
{interpretation.comments.map((comment) => (
<Comment
key={comment.id}
comment={comment}
currentUser={currentUser}
interpretationId={interpretation.id}
onSave={() => onThreadUpdated(true)}
focusRef={focusRef}
onThreadUpdated={onThreadUpdated}
canComment={interpretationAccess.comment}
/>
)}
))}
</div>
</div>
{interpretationAccess.comment && (
<CommentAddForm
currentUser={currentUser}
interpretationId={interpretation.id}
onSave={() => onThreadUpdated(true)}
focusRef={focusRef}
/>
)}
<style jsx>{`
.thread {
margin-top: var(--spacers-dp16);
Expand Down

0 comments on commit dc68027

Please sign in to comment.