From 91468faaf93f3b749f11158e5a13caafebe4bd20 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Wed, 17 Jan 2018 18:30:55 +0100 Subject: [PATCH 1/2] Fix addons display in info modal [SCI-1875] --- app/controllers/client_api/configurations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/client_api/configurations_controller.rb b/app/controllers/client_api/configurations_controller.rb index 30c623ba3..dfa062468 100644 --- a/app/controllers/client_api/configurations_controller.rb +++ b/app/controllers/client_api/configurations_controller.rb @@ -17,7 +17,7 @@ module ClientApi def list_all_addons Rails::Engine.subclasses .select { |c| c.name.start_with?('Scinote') } - .map(&:parent) + .map { |c| c.parent.to_s } end end end From 12fd630d0c455ee92c548ed7c5ce7adaab740a05 Mon Sep 17 00:00:00 2001 From: Adrian Oprea Date: Thu, 18 Jan 2018 09:59:37 +0200 Subject: [PATCH 2/2] fix(AboutScinoteModal): Enable react optimizations Children generated within a loop or by an iterator need to be passed a unique `key` property so React can properly watch their updates and perform the necessary actions. Signed-off-by: Adrian Oprea --- .../components/Navigation/components/AboutScinoteModal.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/src/components/Navigation/components/AboutScinoteModal.jsx b/app/javascript/src/components/Navigation/components/AboutScinoteModal.jsx index fe4fb8460..35fd8dc40 100644 --- a/app/javascript/src/components/Navigation/components/AboutScinoteModal.jsx +++ b/app/javascript/src/components/Navigation/components/AboutScinoteModal.jsx @@ -30,7 +30,11 @@ export default (props: Props): Node => { - {addons.map((addon: string): Node =>

{addon}

)} + { + addons.map( + (addon: string): Node => (

{addon}

) + ) + } }