diff --git a/src/components/ChatRoom.js b/src/components/ChatRoom.js index 0c65d1c..a3dcc8f 100644 --- a/src/components/ChatRoom.js +++ b/src/components/ChatRoom.js @@ -5,9 +5,7 @@ import autoscroll from 'autoscroll-react'; import List from '@material-ui/core/List'; import Divider from '@material-ui/core/Divider'; import Grid from '@material-ui/core/Grid'; -import Button from '@material-ui/core/Button'; import Dropzone from 'react-dropzone'; -import AddCircle from '@material-ui/icons/AddCircle'; import Message from './Message'; import ChatHeader from './ChatHeader'; @@ -15,6 +13,7 @@ import Userlist from './Userlist'; import WhoIsTyping from './WhoIsTyping'; import EmojiPicker from './chatInput/EmojiPicker'; import ChatTextInput from './chatInput/ChatTextInput'; +import FileUploadButton from './chatInput/FileUploadButton'; import { uploadFileAndSend } from '../utils/ipfs'; function onDrop(acceptedFiles, rejectedFiles, ipfs, sendMessage) { @@ -54,16 +53,6 @@ class ChatRoom extends Component { this.setState({ infoPanelActive: !this.state.infoPanelActive }) } - uploadFileDialog() { - this.fileInput.click(); - } - - fileChangedHandler(event) { - const { ipfs, sendMessage } = this.props; - const file = event.target.files[0]; - uploadFileAndSend(ipfs, file, sendMessage); - } - addEmoji(emoji, chatInput, setValue) { setValue('chatInput', `${chatInput}:${emoji.id}:`); NameInput.current.labelNode.focus(); @@ -75,12 +64,6 @@ class ChatRoom extends Component { const messagesHeight = `calc(100vh - ${messagesOffset}px)`; return (