Hide unimplemented context menus (#299)

This commit is contained in:
Felicio Mununga 2022-07-19 12:51:52 +02:00 committed by GitHub
parent b57edc9921
commit e68ea9de5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 59 deletions

View File

@ -1,7 +1,7 @@
import React from 'react' import React from 'react'
import { ChatMenu } from '../../../../components/chat-menu' // import { ChatMenu } from '../../../../components/chat-menu'
import { ContextMenuTrigger } from '../../../../system' // import { ContextMenuTrigger } from '../../../../system'
import { SidebarItem } from '../sidebar-item' import { SidebarItem } from '../sidebar-item'
import type { SidebarItemProps } from '../sidebar-item' import type { SidebarItemProps } from '../sidebar-item'
@ -14,9 +14,9 @@ export const ChannelItem = (props: Props) => {
const { children, ...sidebarItemProps } = props const { children, ...sidebarItemProps } = props
return ( return (
<ContextMenuTrigger> // <ContextMenuTrigger>
<SidebarItem {...sidebarItemProps}>#{children}</SidebarItem> <SidebarItem {...sidebarItemProps}>#{children}</SidebarItem>
<ChatMenu type="context" /> // <ChatMenu type="context" />
</ContextMenuTrigger> // </ContextMenuTrigger>
) )
} }

View File

@ -12,8 +12,8 @@ import {
Avatar, Avatar,
Box, Box,
Button, Button,
ContextMenu, // ContextMenu,
ContextMenuTrigger, // ContextMenuTrigger,
// DropdownMenu, // DropdownMenu,
// DropdownMenuTrigger, // DropdownMenuTrigger,
// EmojiHash, // EmojiHash,
@ -171,7 +171,7 @@ export const ChatMessage = (props: Props) => {
return ( return (
<> <>
<ContextMenuTrigger> {/* <ContextMenuTrigger> */}
<Wrapper mention={mention} pinned={pinned} data-active={reacting}> <Wrapper mention={mention} pinned={pinned} data-active={reacting}>
{responseTo && <MessageReply messageId={responseTo} />} {responseTo && <MessageReply messageId={responseTo} />}
<Flex gap={2}> <Flex gap={2}>
@ -236,10 +236,7 @@ export const ChatMessage = (props: Props) => {
{renderMessage()} {renderMessage()}
<MessageReactions <MessageReactions reactions={reactions} onClick={handleReaction} />
reactions={reactions}
onClick={handleReaction}
/>
</Box> </Box>
</Flex> </Flex>
@ -256,11 +253,11 @@ export const ChatMessage = (props: Props) => {
reactions={reactions} reactions={reactions}
/> />
</Wrapper> </Wrapper>
<ContextMenu> {/* <ContextMenu>
<ContextMenu.Item onSelect={handleReplyClick}>Reply</ContextMenu.Item> <ContextMenu.Item onSelect={handleReplyClick}>Reply</ContextMenu.Item>
{/* <ContextMenu.Item onSelect={handlePinClick}>Pin</ContextMenu.Item> */} <ContextMenu.Item onSelect={handlePinClick}>Pin</ContextMenu.Item>
</ContextMenu> </ContextMenu> */}
</ContextMenuTrigger> {/* </ContextMenuTrigger> */}
</> </>
) )
} }