fix(agreements): #1218

This commit is contained in:
haitao(lj) 2022-11-17 19:20:26 +08:00
parent a2b6c27b60
commit 974e4c75be
2 changed files with 27 additions and 12 deletions

View File

@ -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 || '',
}}
/>
</>
);
};

View File

@ -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 || '',
}}
/>
</>
);
};