0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

refactor(console): link to localized docs website (#1463)

This commit is contained in:
Gao Sun 2022-07-07 23:50:56 +08:00 committed by GitHub
parent a0936f3b03
commit 71b07f468f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View file

@ -1,6 +1,6 @@
import { Optional } from '@silverhand/essentials';
import { conditionalString, Optional } from '@silverhand/essentials';
import React, { FC, ReactNode } from 'react';
import { TFuncKey } from 'react-i18next';
import { TFuncKey, useTranslation } from 'react-i18next';
import useUserPreferences from '@/hooks/use-user-preferences';
@ -46,6 +46,9 @@ export const useSidebarMenuItems = (): {
const {
data: { getStartedHidden },
} = useUserPreferences();
const {
i18n: { language },
} = useTranslation();
const sections: SidebarSection[] = [
{
@ -106,8 +109,10 @@ export const useSidebarMenuItems = (): {
},
{
Icon: Document,
title: 'documentation',
externalLink: 'https://docs.logto.io',
title: 'docs',
externalLink: `https://docs.logto.io/${conditionalString(
language !== 'en' && language.toLowerCase()
)}`,
},
],
},

View file

@ -75,7 +75,7 @@ const translation = {
connectors: 'Connectors',
users: 'User Management',
audit_logs: 'Audit Logs',
documentation: 'Documentation',
docs: 'Docs',
contact_us: 'Contact Us',
settings: 'Settings',
},

View file

@ -75,7 +75,7 @@ const translation = {
connectors: '连接器',
users: '用户管理',
audit_logs: '审计日志',
documentation: '文档',
docs: '文档',
contact_us: '联系我们',
settings: '设置',
},