Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
Chats: hide emoji picker on mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
dkildar committed Jan 17, 2024
1 parent d8e83e8 commit 44706a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
18 changes: 11 additions & 7 deletions src/common/features/chats/components/chat-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ import {
import Tooltip from "../../../components/tooltip";
import { ChatInputFiles } from "./chat-input-files";
import Gallery from "../../../components/gallery";
import useWindowSize from "react-use/lib/useWindowSize";

interface Props {
currentChannel?: Channel;
currentContact?: DirectContact;
}

export default function ChatInput({ currentChannel, currentContact }: Props) {
const size = useWindowSize();
useChannelsQuery();

const inputRef = useRef<HTMLInputElement | null>(null);
Expand Down Expand Up @@ -201,13 +203,15 @@ export default function ChatInput({ currentChannel, currentContact }: Props) {
/>
<div className="flex items-center px-2 h-full gap-3">
<div className="relative">
<Button
ref={emojiButtonRef}
noPadding={true}
appearance="gray-link"
disabled={isDisabled}
icon={emoticonHappyOutlineSvg}
/>
{size.width > 768 && (
<Button
ref={emojiButtonRef}
noPadding={true}
appearance="gray-link"
disabled={isDisabled}
icon={emoticonHappyOutlineSvg}
/>
)}
<EmojiPicker
isDisabled={isDisabled || isSendMessageLoading}
position="top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export function ChatSidebarDirectContact({ contact, onClick, isLink = true }: Pr
() => (contactKeys && isJoined ? contact.pubkey !== contactKeys.pubkey : false),
[contactKeys, contact, isJoined]
);
console.log(contact);

const content = (
<>
Expand Down

0 comments on commit 44706a1

Please sign in to comment.