diff --git a/net/web/src/session/conversation/Conversation.styled.js b/net/web/src/session/conversation/Conversation.styled.js
index 0a06d787..7e218137 100644
--- a/net/web/src/session/conversation/Conversation.styled.js
+++ b/net/web/src/session/conversation/Conversation.styled.js
@@ -52,6 +52,7 @@ export const ConversationWrapper = styled.div`
.thread {
flex-grow: 1;
+ min-height: 0;
}
.divider {
diff --git a/net/web/src/session/conversation/addTopic/AddTopic.jsx b/net/web/src/session/conversation/addTopic/AddTopic.jsx
index b7884676..ae8cfa8b 100644
--- a/net/web/src/session/conversation/addTopic/AddTopic.jsx
+++ b/net/web/src/session/conversation/addTopic/AddTopic.jsx
@@ -1,6 +1,6 @@
import { AddTopicWrapper } from './AddTopic.styled';
import { useAddTopic } from './useAddTopic.hook';
-import { Input, Menu, Dropdown } from 'antd';
+import { Modal, Input, Menu, Dropdown } from 'antd';
import { useRef, useState } from 'react';
import { SoundOutlined, VideoCameraOutlined, PictureOutlined, FontColorsOutlined, FontSizeOutlined, PaperClipOutlined, SendOutlined } from '@ant-design/icons';
import { SketchPicker } from "react-color";
@@ -19,23 +19,37 @@ export function AddTopic({ cardId, channelId }) {
const keyDown = (e) => {
if (e.key === 'Enter' && !e.shiftKey) {
msg.current.blur();
+ addTopic();
}
}
+ const addTopic = async () => {
+ try {
+ await actions.addTopic();
+ }
+ catch (err) {
+ console.log(err);
+ Modal.error({
+ title: 'Failed to Post Message',
+ content: 'Please try again.',
+ });
+ }
+ };
+
const onSelectImage = (e) => {
actions.addImage(e.target.files[0]);
attachImage.current.value = '';
- }
+ };
const onSelectAudio = (e) => {
actions.addAudio(e.target.files[0]);
attachAudio.current.value = '';
- }
+ };
const onSelectVideo = (e) => {
actions.addVideo(e.target.files[0]);
attachVideo.current.value = '';
- }
+ };
const renderItem = (item, index) => {
if (item.image) {
@@ -48,11 +62,11 @@ export function AddTopic({ cardId, channelId }) {
return
actions.setPosition(index, pos)} url={item.url} />
}
return <>>
- }
+ };
const removeItem = (index) => {
actions.removeAsset(index);
- }
+ };
const picker = (