mirror of
https://github.com/balzack/databag.git
synced 2025-03-13 00:50:03 +00:00
fixing dropped assets in edit
This commit is contained in:
parent
a791019a10
commit
5c663e9c6e
@ -4,7 +4,7 @@ import { Button, Dropdown, Input, Tooltip, Menu } from 'antd';
|
||||
import { AddTopicWrapper, BusySpin } from './AddTopic.styled';
|
||||
import { Carousel } from '../../../Carousel/Carousel';
|
||||
import { useAddTopic } from './useAddTopic.hook';
|
||||
import { BgColorsOutlined, FontColorsOutlined, FontSizeOutlined, PaperClipOutlined, SendOutlined } from '@ant-design/icons';
|
||||
import { FontColorsOutlined, FontSizeOutlined, PaperClipOutlined, SendOutlined } from '@ant-design/icons';
|
||||
import { AudioFile } from './AudioFile/AudioFile';
|
||||
import { VideoFile } from './VideoFile/VideoFile';
|
||||
|
||||
@ -106,9 +106,6 @@ export function AddTopic() {
|
||||
<div class="option">
|
||||
<Button icon={<FontColorsOutlined />} size="large" />
|
||||
</div>
|
||||
<div class="option">
|
||||
<Button icon={<BgColorsOutlined />} size="large" />
|
||||
</div>
|
||||
<div class="send">
|
||||
<Button icon={<SendOutlined />} onClick={onSend} size="large" />
|
||||
<BusySpin spinning={state.busy} />
|
||||
|
@ -45,7 +45,6 @@ export function useTopicItem(topic) {
|
||||
let ready = false;
|
||||
let assets = [];
|
||||
if (status === 'confirmed') {
|
||||
console.log(data);
|
||||
try {
|
||||
message = JSON.parse(data);
|
||||
if (message.assets) {
|
||||
@ -93,7 +92,7 @@ console.log(data);
|
||||
updateState({ busy: true });
|
||||
try {
|
||||
await conversation.actions.setTopicSubject(topic.id,
|
||||
{ ...state.message, text: editMessage.current });
|
||||
{ ...state.message, text: editMessage.current, assets: state.assets });
|
||||
updateState({ editing: false });
|
||||
}
|
||||
catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user