adding busy indicator on post button

This commit is contained in:
Roland Osborne 2022-08-30 14:21:40 -07:00
parent 286f523fd9
commit 0726a47be9
2 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import { AddTopicWrapper } from './AddTopic.styled';
import { useAddTopic } from './useAddTopic.hook';
import { Modal, Input, Menu, Dropdown } from 'antd';
import { Modal, Input, Menu, Dropdown, Spin } from 'antd';
import { useRef, useState } from 'react';
import { SoundOutlined, VideoCameraOutlined, PictureOutlined, FontColorsOutlined, FontSizeOutlined, PaperClipOutlined, SendOutlined } from '@ant-design/icons';
import { SketchPicker } from "react-color";
@ -125,7 +125,14 @@ export function AddTopic({ cardId, channelId }) {
</Dropdown>
</div>
<div class="end">
<div class="button" onClick={addTopic}><SendOutlined /></div>
<div class="button" onClick={addTopic}>
{ state.busy && (
<Spin size="small" />
)}
{ !state.busy && (
<SendOutlined />
)}
</div>
</div>
</div>
</AddTopicWrapper>

View File

@ -13,7 +13,7 @@ export function VirtualList({ id, items, itemRenderer, loadMore }) {
const moreDelay = 2000;
const latchDelay = 500;
const defaultHeight = 32;
const defaultHeight = 128;
const rollHeight = 16384;