aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorNaafiyan Ahmed <naafiyan@gmail.com>2022-08-16 21:16:03 -0400
committerNaafiyan Ahmed <naafiyan@gmail.com>2022-08-16 21:16:03 -0400
commit27945b9a931fa9504404174dd08964556dc3aea2 (patch)
tree44f63d7d72767eb9ff0ddb6092ac249bdbcdf97f /src/client/views/collections
parentbb2b38b0e47eaf8e64554d101b605bf35a178239 (diff)
added loading for diff doc types
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionSubView.tsx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index 1ff4f5ab8..30467efa0 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -468,19 +468,16 @@ export function CollectionSubView<X>(moreProps?: X) {
if (typeof files === 'string') {
// uploadYoutubeVideo and similar should return a placeholder, one for each placeholder
// generatedDocuments.push(Docs.Create.LoadingDocument(files, options));
+ const loading = Docs.Create.LoadingDocument(files, options);
+ generatedDocuments.push(loading);
+ DocUtils.uploadYoutubeVideoLoading(files, {}, loading);
} else {
// uploadFilesToDocs and similar should return a placeholder, one for each placeholder
generatedDocuments.push(
...files.map(file => {
const loading = Docs.Create.LoadingDocument(file, options);
// now that there is a doc do whatever slowload was going to do with that file
- if (typeof file === 'string') {
- // uploadYoutubeVideo and similar should return a placeholder, one for each placeholder
- // (await DocUtils.uploadYoutubeVideo(files, options)));
- } else {
- // uploadFilesToDocs and similar should return a placeholder, one for each placeholder
- DocUtils.uploadFileToDoc(file, {}, loading);
- }
+ DocUtils.uploadFileToDoc(file, {}, loading);
return loading;
})
);