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 { AddTopicWrapper, BusySpin } from './AddTopic.styled';
|
||||||
import { Carousel } from '../../../Carousel/Carousel';
|
import { Carousel } from '../../../Carousel/Carousel';
|
||||||
import { useAddTopic } from './useAddTopic.hook';
|
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 { AudioFile } from './AudioFile/AudioFile';
|
||||||
import { VideoFile } from './VideoFile/VideoFile';
|
import { VideoFile } from './VideoFile/VideoFile';
|
||||||
|
|
||||||
@ -106,9 +106,6 @@ export function AddTopic() {
|
|||||||
<div class="option">
|
<div class="option">
|
||||||
<Button icon={<FontColorsOutlined />} size="large" />
|
<Button icon={<FontColorsOutlined />} size="large" />
|
||||||
</div>
|
</div>
|
||||||
<div class="option">
|
|
||||||
<Button icon={<BgColorsOutlined />} size="large" />
|
|
||||||
</div>
|
|
||||||
<div class="send">
|
<div class="send">
|
||||||
<Button icon={<SendOutlined />} onClick={onSend} size="large" />
|
<Button icon={<SendOutlined />} onClick={onSend} size="large" />
|
||||||
<BusySpin spinning={state.busy} />
|
<BusySpin spinning={state.busy} />
|
||||||
|
@ -45,7 +45,6 @@ export function useTopicItem(topic) {
|
|||||||
let ready = false;
|
let ready = false;
|
||||||
let assets = [];
|
let assets = [];
|
||||||
if (status === 'confirmed') {
|
if (status === 'confirmed') {
|
||||||
console.log(data);
|
|
||||||
try {
|
try {
|
||||||
message = JSON.parse(data);
|
message = JSON.parse(data);
|
||||||
if (message.assets) {
|
if (message.assets) {
|
||||||
@ -93,7 +92,7 @@ console.log(data);
|
|||||||
updateState({ busy: true });
|
updateState({ busy: true });
|
||||||
try {
|
try {
|
||||||
await conversation.actions.setTopicSubject(topic.id,
|
await conversation.actions.setTopicSubject(topic.id,
|
||||||
{ ...state.message, text: editMessage.current });
|
{ ...state.message, text: editMessage.current, assets: state.assets });
|
||||||
updateState({ editing: false });
|
updateState({ editing: false });
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user