Skip to content

Commit 2e3df67

Browse files
authored
update lookup
1 parent 01765f6 commit 2e3df67

File tree

1 file changed

+5
-4
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/components

1 file changed

+5
-4
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/components/MultiComment.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ type MultiCommentProps = {
1313
export const MultiComment = ({ x, y, ids }: MultiCommentProps) => {
1414
const {
1515
state: {
16-
comments: { currentComments },
16+
editor,
17+
comments,
1718
},
18-
actions: { comments },
19+
actions,
1920
} = useOvermind();
2021

2122
const list = css({
@@ -84,14 +85,14 @@ export const MultiComment = ({ x, y, ids }: MultiCommentProps) => {
8485
return (
8586
<Element as="ul" css={list}>
8687
{ids.map(id => {
87-
const comment = currentComments.find(c => c.id === id);
88+
const comment = comments.comments[editor.currentSandbox.id][id];
8889
return (
8990
<Element as="li" key={id}>
9091
<Element
9192
as="button"
9293
type="button"
9394
// @ts-ignore
94-
onClick={() => comments.selectComment(id)}
95+
onClick={() => actions.comments.selectComment(id)}
9596
css={item}
9697
>
9798
<Text

0 commit comments

Comments
 (0)