Update ConversationTile.tsx

This commit is contained in:
Alex
2023-10-27 00:52:15 +01:00
parent 678fd28f1d
commit 08a7e666b2

View File

@@ -7,7 +7,6 @@ import CheckMark from '../assets/checkmark.svg';
import Trash from '../assets/trash.svg';
import { selectConversationId } from '../preferences/preferenceSlice';
import { useOutsideAlerter } from '../hooks';
interface ConversationProps {
name: string;
@@ -31,15 +30,15 @@ export default function ConversationTile({
const [isEdit, setIsEdit] = useState(false);
const [conversationName, setConversationsName] = useState('');
useOutsideAlerter(
tileRef,
() =>
handleSaveConversation({
id: conversationId || conversation.id,
name: conversationName,
}),
[conversationName],
);
// useOutsideAlerter(
// tileRef,
// () =>
// handleSaveConversation({
// id: conversationId || conversation.id,
// name: conversationName,
// }),
// [conversationName],
// );
useEffect(() => {
setConversationsName(conversation.name);