feat(comments-pane): refactor comments display logic for improved asset and comment pane management

This commit is contained in:
Yusuf İpek
2026-03-08 18:50:09 +03:00
parent 4746085fc3
commit 14b2809aed
+8 -2
View File
@@ -276,8 +276,13 @@ export const CommentsPane = memo(function CommentsPane({
)}
</div>
<div className="flex-1 overflow-y-auto p-4 space-y-3">
{activePane === 'assets' ? assetsPane : filteredComments.length === 0 ? (
<div className="flex-1 overflow-y-auto">
<div className={cn(activePane === 'assets' ? 'block p-4' : 'hidden')} aria-hidden={activePane !== 'assets'}>
{assetsPane}
</div>
<div className={cn(activePane === 'comments' ? 'block p-4 space-y-3' : 'hidden')} aria-hidden={activePane !== 'comments'}>
{filteredComments.length === 0 ? (
<div className="text-center py-8 text-muted-foreground">
<MessageSquare className="h-8 w-8 mx-auto mb-2 opacity-50" />
<p>No comments yet</p>
@@ -889,6 +894,7 @@ export const CommentsPane = memo(function CommentsPane({
})
)}
</div>
</div>
{activePane === 'comments' ? composer : null}
</div>