about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-04-24 15:35:27 +0200
committerThibG <thib@sitedethib.com>2019-04-24 19:47:11 +0200
commitffab9d626a41ecb05f8f61f7615005753a0ee060 (patch)
tree8b9825dcc2bd0a579c144b244d625c4063a66be2 /app/javascript/flavours/glitch/features
parent9add18604c46e26bb38f72d88daaeb571288027c (diff)
Hide media upload form if no media are attached
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/upload_form.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/upload_form.js b/app/javascript/flavours/glitch/features/compose/components/upload_form.js
index a126cc7e4..4864043a8 100644
--- a/app/javascript/flavours/glitch/features/compose/components/upload_form.js
+++ b/app/javascript/flavours/glitch/features/compose/components/upload_form.js
@@ -16,11 +16,13 @@ export default class UploadForm extends ImmutablePureComponent {
       <div className='composer--upload_form'>
         <UploadProgressContainer />
 
-        <div className='content'>
-          {mediaIds.map(id => (
-            <UploadContainer id={id} key={id} />
-          ))}
-        </div>
+        {mediaIds.size > 0 && (
+          <div className='content'>
+            {mediaIds.map(id => (
+              <UploadContainer id={id} key={id} />
+            ))}
+          </div>
+        )}
       </div>
     );
   }