1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

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

This commit is contained in:
Sergio Betanzos 2021-07-08 18:45:34 +02:00
parent 03d8da58ed
commit 7ccd5fdac9
No known key found for this signature in database
GPG Key ID: E3E704F097737136

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'