Restructure host signup terms dialog documents config and dialog
This commit is contained in:
parent
3ed6f1fe5d
commit
e31b89b952
2 changed files with 26 additions and 4 deletions
|
@ -168,12 +168,32 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
|||
}
|
||||
|
||||
private onAccountDetailsRequest = () => {
|
||||
const termsDialog = this.config.termsDialog;
|
||||
const textComponent = (
|
||||
<>
|
||||
<p>
|
||||
{termsDialog.text}
|
||||
</p>
|
||||
<p>
|
||||
{_t("Learn more in our")}
|
||||
<a href={termsDialog.privacyPolicy.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.privacyPolicy.text}
|
||||
</a>,
|
||||
<a href={termsDialog.termsOfService.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.termsOfService.text}
|
||||
</a> {_t("and")}
|
||||
<a href={termsDialog.cookiePolicy.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.cookiePolicy.text}
|
||||
</a>.
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
Modal.createDialog(
|
||||
QuestionDialog,
|
||||
{
|
||||
title: this.config.termsDialog.title,
|
||||
description: this.config.termsDialog.text,
|
||||
button: this.config.termsDialog.acceptText,
|
||||
title: termsDialog.title,
|
||||
description: textComponent,
|
||||
button: termsDialog.acceptText,
|
||||
onFinished: this.onAccountDetailsDialogFinished,
|
||||
},
|
||||
);
|
||||
|
|
|
@ -53,7 +53,9 @@ interface ILink {
|
|||
|
||||
interface IHostSignupTermsDialogConfig {
|
||||
acceptText: string;
|
||||
termsDocuments: Array<ILink>;
|
||||
cookiePolicy: ILink;
|
||||
privacyPolicy: ILink;
|
||||
termsOfService: ILink;
|
||||
text: string;
|
||||
title: string;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue