Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(agreements): #1218

haitao(lj)974e4c75be2d
diff --git a/ui/src/pages/Legal/Privacy/index.tsx b/ui/src/pages/Legal/Privacy/index.tsx
index 2fe2fdb9..d7acf07e 100644
--- a/ui/src/pages/Legal/Privacy/index.tsx
+++ b/ui/src/pages/Legal/Privacy/index.tsx
@@ -1,8 +1,11 @@
import { FC } from 'react';
+import { useTranslation } from 'react-i18next';
import { useLegalPrivacy } from '@/services';
+import { PageTitle } from '@/components';
const Index: FC = () => {
+ const { t } = useTranslation('translation', { keyPrefix: 'nav_menus' });
const { data: privacy } = useLegalPrivacy();
const contentText = privacy?.privacy_policy_original_text;
let matchUrl: URL | undefined;
@@ -16,13 +19,18 @@ const Index: FC = () => {
window.location.replace(matchUrl.toString());
return null;
}
+
return (
- <div
- className="fmt fs-14"
- dangerouslySetInnerHTML={{
- __html: privacy?.privacy_policy_parsed_text || '',
- }}
- />
+ <>
+ <PageTitle title={t('privacy')} />
+ <h3>{t('privacy')}</h3>
+ <div
+ className="fmt"
+ dangerouslySetInnerHTML={{
+ __html: privacy?.privacy_policy_parsed_text || '',
+ }}
+ />
+ </>
);
};
diff --git a/ui/src/pages/Legal/Tos/index.tsx b/ui/src/pages/Legal/Tos/index.tsx
index 4039bfb1..93182c74 100644
--- a/ui/src/pages/Legal/Tos/index.tsx
+++ b/ui/src/pages/Legal/Tos/index.tsx
@@ -1,8 +1,11 @@
import { FC } from 'react';
+import { useTranslation } from 'react-i18next';
import { useLegalTos } from '@/services';
+import { PageTitle } from '@/components';
const Index: FC = () => {
+ const { t } = useTranslation('translation', { keyPrefix: 'nav_menus' });
const { data: tos } = useLegalTos();
const contentText = tos?.terms_of_service_original_text;
let matchUrl: URL | undefined;
@@ -17,12 +20,16 @@ const Index: FC = () => {
return null;
}
return (
- <div
- className="fmt fs-14"
- dangerouslySetInnerHTML={{
- __html: tos?.terms_of_service_parsed_text || '',
- }}
- />
+ <>
+ <PageTitle title={t('tos')} />
+ <h3>{t('tos')}</h3>
+ <div
+ className="fmt"
+ dangerouslySetInnerHTML={{
+ __html: tos?.terms_of_service_parsed_text || '',
+ }}
+ />
+ </>
);
};