Skip to content

Commit

Permalink
fix: donate i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Oct 16, 2023
1 parent ff28da5 commit 3ba9298
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/AppFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import HeartSvg from '../public/images/nav/heart.svg'
const AppFooter = (props) => {
const { t } = useTranslation('common')
const router = useRouter()
const docsLocale = router.locale == 'zh-CN' ? '/zh/' : ''
const docsLocale = router.locale == 'zh-CN' ? '/zh' : ''
return (
<footer className="py-20 md:py-40">
<Container>
Expand Down Expand Up @@ -50,7 +50,7 @@ const AppFooter = (props) => {
</a>
</li>
<Link
href="https://docs.gopeed.com/donate.html"
href={`https://docs.gopeed.com${docsLocale}/donate.html`}
className="flex items-center space-x-3 transition hover:text-primary"
>
<HeartSvg className="w-5" />
Expand Down
4 changes: 2 additions & 2 deletions components/AppHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Translate from './Translate'
const AppHeader = (props) => {
const { t } = useTranslation('common')
const router = useRouter()
const docsLocale = router.locale == 'zh-CN' ? '/zh/' : ''
const docsLocale = router.locale == 'zh-CN' ? '/zh' : ''
return (
<header>
<nav className="z-10 w-full absolute">
Expand Down Expand Up @@ -52,7 +52,7 @@ const AppHeader = (props) => {
</li>
<li>
<Link
href="https://docs.gopeed.com/donate.html"
href={`https://docs.gopeed.com${docsLocale}/donate.html`}
className="block md:px-4 transition hover:text-primary"
>
<span>{t('donate')}</span>
Expand Down

0 comments on commit 3ba9298

Please sign in to comment.