mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
wrap promise response in set timeout to keep local state in sync (#2531)
This commit is contained in:
parent
e7066f02ec
commit
15533d3d8a
@ -71,7 +71,7 @@ export const EditLogo: FC = () => {
|
||||
|
||||
getBase64(file, (url: string) => {
|
||||
setlogoUrl(url);
|
||||
return res();
|
||||
setTimeout(() => res(), 100);
|
||||
});
|
||||
});
|
||||
};
|
||||
@ -80,7 +80,6 @@ export const EditLogo: FC = () => {
|
||||
const handleLogoUpdate = async () => {
|
||||
if (logoUrl !== currentLogo) {
|
||||
setSubmitStatus(createInputStatus(STATUS_PROCESSING));
|
||||
|
||||
await postConfigUpdateToAPI({
|
||||
apiPath,
|
||||
data: { value: logoUrl },
|
||||
|
@ -1,5 +1,3 @@
|
||||
import { RcFile } from 'antd/lib/upload';
|
||||
|
||||
export const MAX_IMAGE_FILESIZE = 2097152;
|
||||
export const ACCEPTED_IMAGE_TYPES = ['image/png', 'image/jpeg', 'image/gif'];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user