From 7ccd5fdac9347ed6711b333bd9ccaee787e27ba8 Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Thu, 8 Jul 2021 18:45:34 +0200 Subject: [PATCH] F OpenNebula/one#5422: Add doc to client/dev --- src/fireedge/src/client/dev/_app.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/fireedge/src/client/dev/_app.js b/src/fireedge/src/client/dev/_app.js index 23ada17e91..4da13d4b42 100644 --- a/src/fireedge/src/client/dev/_app.js +++ b/src/fireedge/src/client/dev/_app.js @@ -21,6 +21,12 @@ import ProvisionApp from 'client/apps/provision' import { isDevelopment, isBackend } from 'client/utils' import { _APPS, APPS } from 'client/constants' +/** + * Render App by url: http:///fireedge/. + * + * @param {object} props - Props from server + * @returns {React.JSXElementConstructor} Returns App + */ const DevelopmentApp = props => { let appName = '' @@ -36,12 +42,10 @@ const DevelopmentApp = props => { }) } - return ( - <> - {appName === _APPS.provision.name && } - {appName === _APPS.sunstone.name && } - - ) + return { + [_APPS.provision.name]: , + [_APPS.sunstone.name]: + }[appName] } DevelopmentApp.displayName = 'DevelopmentApp'