Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Login Terms custom content #28999

Merged
merged 12 commits into from
May 31, 2023
12 changes: 5 additions & 7 deletions packages/web-ui-registration/src/components/LoginTerms.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Trans } from 'react-i18next';
import type { ReactElement } from 'react';
import { Link, HorizontalWizardLayoutCaption } from '@rocket.chat/layout';
import { HorizontalWizardLayoutCaption } from '@rocket.chat/layout';
import { useSetting } from '@rocket.chat/ui-contexts';
import { Box } from '@rocket.chat/fuselage';

export const LoginTerms = (): ReactElement => {
const loginTerms = useSetting('Layout_Login_Terms') as string;
return (
<HorizontalWizardLayoutCaption>
<Trans
defaults='By proceeding you are agreeing to our <0>{{terms}}</0>, <1>{{privacyPolicy}}</1> and <2>{{legalNotice}}</2>.'
values={{ terms: 'Terms of Service', privacyPolicy: 'Privacy Policy', legalNotice: 'Legal Notice' }}
components={[<Link href='/terms-of-service' />, <Link href='/privacy-policy' />, <Link href='/legal-notice' />]}
/>
<Box withRichContent dangerouslySetInnerHTML={{ __html: loginTerms }} />
</HorizontalWizardLayoutCaption>
);
};
Expand Down