mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-02 05:06:14 +09:00
F OpenNebula/one#5422: Add doc to client/dev
This commit is contained in:
1 file changed
+10
-6
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user