From 2c5068727997d4b223e74e765df75d9773b954f7 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 26 Feb 2017 01:23:44 +0100 Subject: Improve compose form performance, upgrade JS dependencies. LightingBox now allows to cycle through multiple images --- .../components/features/ui/containers/modal_container.jsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'app/assets/javascripts/components/features/ui') diff --git a/app/assets/javascripts/components/features/ui/containers/modal_container.jsx b/app/assets/javascripts/components/features/ui/containers/modal_container.jsx index 4c47fb8c5..d8301b20f 100644 --- a/app/assets/javascripts/components/features/ui/containers/modal_container.jsx +++ b/app/assets/javascripts/components/features/ui/containers/modal_container.jsx @@ -131,19 +131,14 @@ const Modal = React.createClass({ return null; } - const url = media.get(index).get('url'); - const hasLeft = index > 0; - const hasRight = index + 1 < media.size; + const url = media.get(index).get('url'); let leftNav, rightNav; leftNav = rightNav = ''; - if (hasLeft) { - leftNav =
; - } - - if (hasRight) { + if (media.size > 1) { + leftNav =
; rightNav =
; } -- cgit