diff --git a/concord-client/src/components/channel/ChannelItem.tsx b/concord-client/src/components/channel/ChannelItem.tsx index 567fc96..b06f892 100644 --- a/concord-client/src/components/channel/ChannelItem.tsx +++ b/concord-client/src/components/channel/ChannelItem.tsx @@ -38,11 +38,6 @@ const ChannelItem: React.FC = ({ channel }) => { if (isConnectedToThisChannel) { leaveChannel(); } else if (currentUser && token) { - console.log({ - channelId: channel.id, - currentUser: currentUser.id, - token: token, - }); joinChannel(channel.id, currentUser.id, token); } } diff --git a/concord-client/src/components/channel/ChannelList.tsx b/concord-client/src/components/channel/ChannelList.tsx index 0c3ec13..6862c86 100644 --- a/concord-client/src/components/channel/ChannelList.tsx +++ b/concord-client/src/components/channel/ChannelList.tsx @@ -18,7 +18,7 @@ const CategoryHeader: React.FC = ({ return ( - - - - + ); }; diff --git a/concord-client/src/components/layout/MemberList.tsx b/concord-client/src/components/layout/MemberList.tsx index 1e9f700..776143c 100644 --- a/concord-client/src/components/layout/MemberList.tsx +++ b/concord-client/src/components/layout/MemberList.tsx @@ -206,16 +206,16 @@ const MemberList: React.FC = () => { ); return ( -
+
{/* Header */} -
-
- -

+

+
+ +

Members

-

+

{members.length}

diff --git a/concord-client/src/components/layout/ServerSidebar.tsx b/concord-client/src/components/layout/ServerSidebar.tsx index a1b46e8..4ef3a90 100644 --- a/concord-client/src/components/layout/ServerSidebar.tsx +++ b/concord-client/src/components/layout/ServerSidebar.tsx @@ -51,17 +51,17 @@ const ServerSidebar: React.FC = () => { return ( -
+
{/* Home/DM Button */} + + +

Add a Server

+
+
+ )}
- - {/* Add Server Button - Only show if user can create servers */} - {canCreateServer && ( - - - - - -

Add a Server

-
-
- )}
); diff --git a/concord-client/src/components/layout/UserPanel.tsx b/concord-client/src/components/layout/UserPanel.tsx index c1befa2..0d45c2c 100644 --- a/concord-client/src/components/layout/UserPanel.tsx +++ b/concord-client/src/components/layout/UserPanel.tsx @@ -133,7 +133,7 @@ const UserPanel: React.FC = () => { useVoiceStore(); return ( -
+
{/* User Info */}
diff --git a/concord-client/src/components/message/MessageInput.tsx b/concord-client/src/components/message/MessageInput.tsx index 734b1be..32213d9 100644 --- a/concord-client/src/components/message/MessageInput.tsx +++ b/concord-client/src/components/message/MessageInput.tsx @@ -1,9 +1,8 @@ -// src/components/message/MessageInput.tsx - import { Message } from "@/lib/api-client"; -import { useState, useRef, useEffect } from "react"; // Keep useRef +import { useState, useRef, useEffect } from "react"; import { useSendMessage } from "@/hooks/useMessages"; import { Button } from "@/components/ui/button"; +import { Textarea } from "@/components/ui/textarea"; interface MessageUser { id: string; @@ -27,24 +26,21 @@ export const MessageInput: React.FC = ({ replyingToUser, }) => { const [content, setContent] = useState(""); - const textareaRef = useRef(null); const formRef = useRef(null); // Use the API hook for sending messages const sendMessageMutation = useSendMessage(); - // Auto-resize textarea and focus when replying + // Auto-resize textarea (using direct DOM access as a fallback, no ref needed) useEffect(() => { - if (textareaRef.current) { - textareaRef.current.style.height = "auto"; - textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`; - - // Focus the input when a reply is initiated - if (replyingTo) { - textareaRef.current.focus(); - } + const textarea = document.getElementById( + "message-input-textarea", + ) as HTMLTextAreaElement | null; + if (textarea) { + textarea.style.height = "auto"; + textarea.style.height = `${textarea.scrollHeight}px`; } - }, [content, replyingTo]); + }, [content]); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); @@ -71,7 +67,7 @@ export const MessageInput: React.FC = ({ }; return ( -
+
{replyingTo && replyingToUser && (
@@ -97,26 +93,15 @@ export const MessageInput: React.FC = ({ )}
-
-