Add channel muting (#108)
This commit is contained in:
parent
df8387d5c0
commit
6db3b9272d
|
@ -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 = ({
|
|||
/>
|
||||
)}
|
||||
<MenuItem
|
||||
onClick={() => channel.isMuted === true}
|
||||
onClick={() => {
|
||||
channel.isMuted = true;
|
||||
setShowChannelMenu(false);
|
||||
}}
|
||||
Svg={MuteSvg}
|
||||
text="Mute Chat"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue