From 02032c280447652921ed39e870c0ef32f862384d Mon Sep 17 00:00:00 2001 From: Yen Colon Date: Tue, 19 Jan 2021 23:46:36 -0400 Subject: [PATCH] exposing who likes a part --- .../components/EmojiReaction/EmojiReaction.js | 26 +++++++++++-------- web/src/components/PartProfile/PartProfile.js | 12 +++++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/web/src/components/EmojiReaction/EmojiReaction.js b/web/src/components/EmojiReaction/EmojiReaction.js index ce254b9..dbc931a 100644 --- a/web/src/components/EmojiReaction/EmojiReaction.js +++ b/web/src/components/EmojiReaction/EmojiReaction.js @@ -20,6 +20,7 @@ const EmojiReaction = ({ emotes, userEmotes, onEmote = () => {}, + onShowPartReactions, className, }) => { const { currentUser } = useAuth() @@ -107,17 +108,20 @@ const EmojiReaction = ({ horizontal: 'left', }} > -
- {emojiMenu.map((emoji, i) => ( - - ))} +
+
+ {emojiMenu.map((emoji, i) => ( + + ))} +
+
diff --git a/web/src/components/PartProfile/PartProfile.js b/web/src/components/PartProfile/PartProfile.js index 7ff2d8e..222a47b 100644 --- a/web/src/components/PartProfile/PartProfile.js +++ b/web/src/components/PartProfile/PartProfile.js @@ -2,12 +2,14 @@ import { useState, useEffect, useRef } from 'react' import { useAuth } from '@redwoodjs/auth' import { Link, navigate, routes } from '@redwoodjs/router' import Editor from 'rich-markdown-editor' +import Dialog from '@material-ui/core/Dialog' import ImageUploader from 'src/components/ImageUploader' import ConfirmDialog from 'src/components/ConfirmDialog' import Breadcrumb from 'src/components/Breadcrumb' import EmojiReaction from 'src/components/EmojiReaction' import Button from 'src/components/Button' +import PartReactionsCell from '../PartReactionsCell' import { countEmotes } from 'src/helpers/emote' import { getActiveClasses } from 'get-active-classes' @@ -21,6 +23,7 @@ const PartProfile = ({ }) => { const [comment, setComment] = useState('') const [isConfirmDialogOpen, setIsConfirmDialogOpen] = useState(false) + const [isReactionsModalOpen, setIsReactionsModalOpen] = useState(false) const [isInvalid, setIsInvalid] = useState(false) const { currentUser } = useAuth() const editorRef = useRef(null) @@ -94,6 +97,7 @@ const PartProfile = ({ emotes={emotes} userEmotes={userEmotes} onEmote={onReaction} + onShowPartReactions={() => setIsReactionsModalOpen(true)} />