From ffab9d626a41ecb05f8f61f7615005753a0ee060 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 24 Apr 2019 15:35:27 +0200 Subject: Hide media upload form if no media are attached --- .../glitch/features/compose/components/upload_form.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'app/javascript/flavours/glitch/features') 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 {
-
- {mediaIds.map(id => ( - - ))} -
+ {mediaIds.size > 0 && ( +
+ {mediaIds.map(id => ( + + ))} +
+ )}
); } -- cgit