Skip to content

Commit

Permalink
Fix route locale for Privacy Policy in Donation Component
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-yankov committed Oct 19, 2024
1 parent 21ff677 commit 3d7b84e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/common/form/AcceptPrivacyPolicyField.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useTranslation } from 'next-i18next'
import { Typography } from '@mui/material'
import { useRouter } from 'next/router'

import { routes } from 'common/routes'
import ExternalLink from 'components/common/ExternalLink'
Expand All @@ -18,6 +19,8 @@ export default function AcceptPrivacyPolicyField({
...rest
}: AcceptGDPRFieldProps) {
const { t } = useTranslation()
const { locale } = useRouter()

return (
<CheckboxField
name={name}
Expand All @@ -26,7 +29,9 @@ export default function AcceptPrivacyPolicyField({
label={
<Typography variant="body2">
{t('validation:informed-agree-with')}{' '}
<ExternalLink href={routes.privacyPolicy}>{t('validation:gdpr')}</ExternalLink>
<ExternalLink href={`/${locale}${routes.privacyPolicy}`}>
{t('validation:gdpr')}
</ExternalLink>
</Typography>
}
{...rest}
Expand Down

0 comments on commit 3d7b84e

Please sign in to comment.