diff --git a/editor/src/components/canvas/controls/comment-indicator.tsx b/editor/src/components/canvas/controls/comment-indicator.tsx index a1420ce0d07e..47167eea1e39 100644 --- a/editor/src/components/canvas/controls/comment-indicator.tsx +++ b/editor/src/components/canvas/controls/comment-indicator.tsx @@ -165,7 +165,6 @@ const CommentIndicatorsInner = React.memo(() => { {temporaryIndicatorData != null ? ( ((props) => { - const { - position, - bgColor, - fgColor, - avatarUrl, - avatarInitials, - opacity, - resolved, - isActive, - read, - } = props + const { position, bgColor, fgColor, avatarUrl, avatarInitials, resolved, isActive, read } = props function getIndicatorStyle() { const base: Interpolation = { position: 'fixed', top: position.y + 3, left: position.x - 3, - opacity: opacity, filter: resolved ? 'grayscale(1)' : undefined, width: IndicatorSize, height: IndicatorSize, @@ -339,7 +326,6 @@ const CommentIndicator = React.memo(({ thread }: CommentIndicatorProps) => { (isActive || !hovered) && !dragging, store.editor.showResolvedThreads, 'useActiveThreads showResolved', ) if (!showResolved) { - return unresolvedThreads + return threads.filter((t) => !t.metadata.resolved) } - return [...unresolvedThreads, ...resolvedThreads] + return threads } export function useResolvedThreads() { - return useThreads({ - query: { - metadata: { - resolved: true, - }, - }, - }) + const threads = useThreads() + return { + ...threads, + threads: threads.threads.filter((t) => t.metadata.resolved), + } } export function useUnresolvedThreads() { - return useThreads({ - query: { - metadata: { - resolved: false, - }, - }, - }) + const threads = useThreads() + return { + ...threads, + threads: threads.threads.filter((t) => !t.metadata.resolved), + } } export function useSetThreadReadStatusOnMount(thread: ThreadData | null) {