import { Button, TextField } from "@mui/material" import { useState } from "react" import { connect } from "react-redux" import { actionUpsertChat } from "../../actions/actionsForChats" import { history } from "../../App" import { backendURL } from "../../helpers/gql" import DropZoneAvatar from "../DropZone/DropZoneAvatar" import { ChatEditorModalWrapper } from "./ChatEditorModal.style" const ChatEditorModal = ({handleClose, chats, updateChat}) => { const [,route, histId] = history.location.pathname.split('/'); const [chatNameValue, setChatNameValue] = useState(chats[histId].title); const [avatar, setAvatar] = useState(); return (
setChatNameValue(e.target.value)} />
) } export default connect(state => ({chats: state?.chats || []}), {updateChat: actionUpsertChat})(ChatEditorModal);