Skip to content

Commit

Permalink
update lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraVieira authored Mar 27, 2020
1 parent 01765f6 commit 2e3df67
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ type MultiCommentProps = {
export const MultiComment = ({ x, y, ids }: MultiCommentProps) => {
const {
state: {
comments: { currentComments },
editor,
comments,
},
actions: { comments },
actions,
} = useOvermind();

const list = css({
Expand Down Expand Up @@ -84,14 +85,14 @@ export const MultiComment = ({ x, y, ids }: MultiCommentProps) => {
return (
<Element as="ul" css={list}>
{ids.map(id => {
const comment = currentComments.find(c => c.id === id);
const comment = comments.comments[editor.currentSandbox.id][id];
return (
<Element as="li" key={id}>
<Element
as="button"
type="button"
// @ts-ignore
onClick={() => comments.selectComment(id)}
onClick={() => actions.comments.selectComment(id)}
css={item}
>
<Text
Expand Down

0 comments on commit 2e3df67

Please sign in to comment.