mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 10:12:43 +08:00
fix: check and update doc links (#30849)
Co-authored-by: Riskey <36894937+RiskeyL@users.noreply.github.com>
This commit is contained in:
@@ -1,16 +1,7 @@
|
||||
import { useMemo } from 'react'
|
||||
import { useGetLanguage } from '@/context/i18n'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
|
||||
export const useDatasetApiAccessUrl = () => {
|
||||
const locale = useGetLanguage()
|
||||
const docLink = useDocLink()
|
||||
|
||||
const apiReferenceUrl = useMemo(() => {
|
||||
if (locale === 'zh_Hans')
|
||||
return 'https://docs.dify.ai/api-reference/%E6%95%B0%E6%8D%AE%E9%9B%86'
|
||||
if (locale === 'ja_JP')
|
||||
return 'https://docs.dify.ai/api-reference/%E3%83%87%E3%83%BC%E3%82%BF%E3%82%BB%E3%83%83%E3%83%88'
|
||||
return 'https://docs.dify.ai/api-reference/datasets'
|
||||
}, [locale])
|
||||
|
||||
return apiReferenceUrl
|
||||
return docLink('/api-reference/datasets/get-knowledge-base-list')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user