Remove unused code

This commit is contained in:
2025-09-17 20:57:07 +03:00
Unverified
parent adfd813d80
commit 39677f695f
@@ -1,23 +1,17 @@
import { useState } from "react"; import { useState } from "react";
import { useChat } from "../../hooks/useChat";
import { RichTextArea } from "../core/RichTextArea"; import { RichTextArea } from "../core/RichTextArea";
interface ChatInputWrapperProps { interface ChatInputWrapperProps {
onSendMessage?: (message: string) => void; onSendMessage: (message: string) => void;
} }
export function ChatInputWrapper({ onSendMessage }: ChatInputWrapperProps) { export function ChatInputWrapper({ onSendMessage }: ChatInputWrapperProps) {
const [message, setMessage] = useState(""); const [message, setMessage] = useState("");
const { sendMessage } = useChat();
const handleSubmit = async (e: React.FormEvent) => { const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault(); e.preventDefault();
if (message.trim()) { if (message.trim()) {
if (onSendMessage) {
onSendMessage(message); onSendMessage(message);
} else {
await sendMessage(message);
}
setMessage(""); setMessage("");
} }
}; };