From b68f185573158dedabe4b78bdf86a0cfaa5abb96 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 11 Jan 2024 08:14:24 -0500 Subject: [PATCH] Reduce `LineLength` for `react_component` helper in views/admin (#28694) --- .../admin/reports/_media_attachments.html.haml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/views/admin/reports/_media_attachments.html.haml b/app/views/admin/reports/_media_attachments.html.haml index 8ecd7444d2..3c52d69178 100644 --- a/app/views/admin/reports/_media_attachments.html.haml +++ b/app/views/admin/reports/_media_attachments.html.haml @@ -2,6 +2,16 @@ = render_video_component(status, visible: false) - elsif status.ordered_media_attachments.first.audio? - audio = status.ordered_media_attachments.first - = react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, lang: status.language, duration: audio.file.meta.dig(:original, :duration) + = react_component :audio, + alt: audio.description, + duration: audio.file.meta.dig(:original, :duration), + height: 110, + lang: status.language, + src: audio.file.url(:original) - else - = react_component :media_gallery, height: 343, sensitive: status.sensitive?, visible: false, lang: status.language, media: status.ordered_media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } + = react_component :media_gallery, + height: 343, + lang: status.language, + media: status.ordered_media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }, + sensitive: status.sensitive?, + visible: false