F OpenNebula/one#5422: Add doc to client/dev

This commit is contained in:
Sergio Betanzos committed 2021-07-12 09:03:57 +02:00
1 parent 03d8da58ed
commit 7ccd5fdac9
1 file changed
+10 -6
+10 -6
View File
@@ -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://<host:port>/fireedge/<APP>.
*
* @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 && <ProvisionApp {...props} />}
{appName === _APPS.sunstone.name && <SunstoneApp {...props} />}
</>
)
return {
[_APPS.provision.name]: <ProvisionApp {...props} />,
[_APPS.sunstone.name]: <SunstoneApp {...props} />
}[appName]
}
DevelopmentApp.displayName = 'DevelopmentApp'