1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

M #~: Minor fix to login links (#2228)

This commit is contained in:
Sergio Betanzos 2022-07-13 18:43:40 +02:00 committed by GitHub
parent 18f26d4fc9
commit d5813d6a96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,15 +178,7 @@ function Login() {
const AppLinks = () => {
const { appTitle } = useGeneral()
const isNotCurrentApp = (app) => app !== `${appTitle}`.toLowerCase()
const transformAppTitle = (app) =>
APPS_WITH_ONE_PREFIX.includes(app)
? `One${sentenceCase(app)}`
: sentenceCase(app)
const otherApps = APPS.filter(isNotCurrentApp).map(transformAppTitle)
const otherApps = APPS.filter((app) => app !== `${appTitle}`.toLowerCase())
if (otherApps?.length === 0) {
return null
@ -195,12 +187,20 @@ const AppLinks = () => {
return otherApps.map((app) => (
<Link
key={app}
data-cy={`goto-${app}`.toLowerCase()}
href={`${APP_URL}/${app}`.toLowerCase()}
variant="caption"
color="text.secondary"
padding={1}
>
<Translate word={T.TakeMeToTheAppGui} values={app} />
<Translate
word={T.TakeMeToTheAppGui}
values={
APPS_WITH_ONE_PREFIX.includes(app)
? `One${sentenceCase(app)}`
: sentenceCase(app)
}
/>
</Link>
))
}