diff --git a/packages/status-react/src/routes/chat/components/chat-message/actions.tsx b/packages/status-react/src/routes/chat/components/chat-message/actions.tsx index 76b0b7c..269dd54 100644 --- a/packages/status-react/src/routes/chat/components/chat-message/actions.tsx +++ b/packages/status-react/src/routes/chat/components/chat-message/actions.tsx @@ -22,6 +22,7 @@ interface Props { pinned: boolean onReplyClick: () => void onEditClick: () => void + onPinClick: () => void reacting: boolean onReactingChange: (reacting: boolean) => void reactions: Reactions @@ -33,6 +34,7 @@ export const Actions = (props: Props) => { pinned, onReplyClick, onEditClick, + onPinClick, reacting, onReactingChange, reactions, @@ -77,19 +79,16 @@ export const Actions = (props: Props) => { )} - {pinned ? ( - - - - - - ) : ( - - - - - - )} + + + {pinned ? : } + + {owner && ( diff --git a/packages/status-react/src/routes/chat/components/chat-message/index.tsx b/packages/status-react/src/routes/chat/components/chat-message/index.tsx index e494586..f88ae41 100644 --- a/packages/status-react/src/routes/chat/components/chat-message/index.tsx +++ b/packages/status-react/src/routes/chat/components/chat-message/index.tsx @@ -60,12 +60,26 @@ export const ChatMessage = (props: Props) => { const { dispatch } = useChatContext() - if (editing) { - return ( - - + const handleReplyClick = () => { + dispatch({ + type: 'SET_REPLY', + message, + }) + } + + const handlePinClick = () => { + console.log(pinned) + } + + const handleReaction = (reaction: string) => { + console.log(reaction) + } + + const renderMessage = () => { + if (editing) { + return ( - + - - ) - } + ) + } - const handleReplyClick = () => { - dispatch({ - type: 'SET_REPLY', - message, - }) - } - - const handleReaction = (reaction: string) => { - console.log(reaction) - } - - const renderMessage = () => { switch (type) { case 'text': { // @@ -210,14 +211,15 @@ export const ChatMessage = (props: Props) => { pinned={pinned} onEditClick={() => setEditing(true)} onReplyClick={handleReplyClick} + onPinClick={handlePinClick} reacting={reacting} onReactingChange={setReacting} reactions={reactions} /> - Reply - Pin + Reply + Pin @@ -280,4 +282,6 @@ const Wrapper = styled('div', { }, }, }, + + compoundVariants: [], })