useDocLink

pull/20801/head
Bowen Liang 12 months ago
parent acb5a9074f
commit eef7f7ccf5

@ -25,7 +25,7 @@ import { EDUCATION_VERIFYING_LOCALSTORAGE_ITEM } from '@/app/education-apply/con
import { getLocaleOnClient } from '@/i18n' import { getLocaleOnClient } from '@/i18n'
import { noop } from 'lodash-es' import { noop } from 'lodash-es'
import DifyLogo from '../components/base/logo/dify-logo' import DifyLogo from '../components/base/logo/dify-logo'
import { getDocLink } from '@/context/i18n' import { useDocLink } from '@/i18n/language'
const EducationApplyAge = () => { const EducationApplyAge = () => {
const { t } = useTranslation() const { t } = useTranslation()
const locale = getLocaleOnClient() const locale = getLocaleOnClient()
@ -42,6 +42,7 @@ const EducationApplyAge = () => {
const updateEducationStatus = useInvalidateEducationStatus() const updateEducationStatus = useInvalidateEducationStatus()
const { notify } = useToastContext() const { notify } = useToastContext()
const router = useRouter() const router = useRouter()
const docLink = useDocLink()
const handleModalConfirm = () => { const handleModalConfirm = () => {
setShowModal(undefined) setShowModal(undefined)
@ -158,7 +159,7 @@ const EducationApplyAge = () => {
<div className='mb-4 mt-5 h-[1px] bg-gradient-to-r from-[rgba(16,24,40,0.08)]'></div> <div className='mb-4 mt-5 h-[1px] bg-gradient-to-r from-[rgba(16,24,40,0.08)]'></div>
<a <a
className='system-xs-regular flex items-center text-text-accent' className='system-xs-regular flex items-center text-text-accent'
href={getDocLink('/getting-started/dify-for-education')} href={docLink('/getting-started/dify-for-education')}
target='_blank' target='_blank'
> >
{t('education.learn')} {t('education.learn')}

@ -6,7 +6,7 @@ import {
} from '@remixicon/react' } from '@remixicon/react'
import Button from '@/app/components/base/button' import Button from '@/app/components/base/button'
import { getLocaleOnClient } from '@/i18n' import { getLocaleOnClient } from '@/i18n'
import { getDocLink } from '@/context/i18n' import { useDocLink } from '@/i18n/language'
export type IConfirm = { export type IConfirm = {
className?: string className?: string
@ -34,8 +34,8 @@ function Confirm({
const locale = getLocaleOnClient() const locale = getLocaleOnClient()
const dialogRef = useRef<HTMLDivElement>(null) const dialogRef = useRef<HTMLDivElement>(null)
const [isVisible, setIsVisible] = useState(isShow) const [isVisible, setIsVisible] = useState(isShow)
const dl = useDocLink()
const docLink = getDocLink('/getting-started/dify-for-education') const docLink = dl('/getting-started/dify-for-education')
const handleClick = () => { const handleClick = () => {
window.open(docLink, '_blank', 'noopener,noreferrer') window.open(docLink, '_blank', 'noopener,noreferrer')

Loading…
Cancel
Save