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:
parent
a0936f3b03
commit
71b07f468f
3 changed files with 11 additions and 6 deletions
|
@ -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()
|
||||
)}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ const translation = {
|
|||
connectors: '连接器',
|
||||
users: '用户管理',
|
||||
audit_logs: '审计日志',
|
||||
documentation: '文档',
|
||||
docs: '文档',
|
||||
contact_us: '联系我们',
|
||||
settings: '设置',
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue