From 6db3b9272d3a9a04a307617847bb17a4d217da3c Mon Sep 17 00:00:00 2001 From: Szymon Szlachtowicz <38212223+Szymx95@users.noreply.github.com> Date: Tue, 2 Nov 2021 21:44:30 +0100 Subject: [PATCH] Add channel muting (#108) --- packages/react-chat/src/components/Form/ChannelMenu.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-chat/src/components/Form/ChannelMenu.tsx b/packages/react-chat/src/components/Form/ChannelMenu.tsx index 4a66adff..06fece52 100644 --- a/packages/react-chat/src/components/Form/ChannelMenu.tsx +++ b/packages/react-chat/src/components/Form/ChannelMenu.tsx @@ -28,7 +28,6 @@ function MenuItem({ Svg, text, onClick }: MenuItemProps) { interface ChannelMenuProps { channel: ChannelData; - messages: ChatMessage[]; switchMemberList: () => void; setShowChannelMenu: (val: boolean) => void; @@ -36,7 +35,6 @@ interface ChannelMenuProps { export const ChannelMenu = ({ channel, - messages, switchMemberList, setShowChannelMenu, @@ -58,7 +56,10 @@ export const ChannelMenu = ({ /> )} channel.isMuted === true} + onClick={() => { + channel.isMuted = true; + setShowChannelMenu(false); + }} Svg={MuteSvg} text="Mute Chat" />