Disable file selector when upload is locked from another tab.

This commit is contained in:
infinite-persistence 2021-12-13 15:33:39 +08:00
parent 392e7c37a4
commit e3956150a3
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -160,6 +160,12 @@ export default function WebUploadItem(props: Props) {
);
}
React.useEffect(() => {
if (locked && showFileSelector) {
setShowFileSelector(false);
}
}, [locked, showFileSelector]);
return (
<li className={'web-upload-item claim-preview claim-preview--padded claim-preview--inactive card--inline'}>
<FileThumbnail thumbnail={params.thumbnail_url} />