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 {
|
interface ChannelMenuProps {
|
||||||
channel: ChannelData;
|
channel: ChannelData;
|
||||||
|
|
||||||
messages: ChatMessage[];
|
messages: ChatMessage[];
|
||||||
switchMemberList: () => void;
|
switchMemberList: () => void;
|
||||||
setShowChannelMenu: (val: boolean) => void;
|
setShowChannelMenu: (val: boolean) => void;
|
||||||
|
@ -36,7 +35,6 @@ interface ChannelMenuProps {
|
||||||
|
|
||||||
export const ChannelMenu = ({
|
export const ChannelMenu = ({
|
||||||
channel,
|
channel,
|
||||||
|
|
||||||
messages,
|
messages,
|
||||||
switchMemberList,
|
switchMemberList,
|
||||||
setShowChannelMenu,
|
setShowChannelMenu,
|
||||||
|
@ -58,7 +56,10 @@ export const ChannelMenu = ({
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => channel.isMuted === true}
|
onClick={() => {
|
||||||
|
channel.isMuted = true;
|
||||||
|
setShowChannelMenu(false);
|
||||||
|
}}
|
||||||
Svg={MuteSvg}
|
Svg={MuteSvg}
|
||||||
text="Mute Chat"
|
text="Mute Chat"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue