From e31b89b95251c48758dc1d9ea49c5c0ee9b81acd Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Tue, 9 Feb 2021 12:23:27 +0200 Subject: [PATCH] Restructure host signup terms dialog documents config and dialog --- .../views/dialogs/HostSignupDialog.tsx | 26 ++++++++++++++++--- .../views/dialogs/HostSignupDialogTypes.ts | 4 ++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/components/views/dialogs/HostSignupDialog.tsx b/src/components/views/dialogs/HostSignupDialog.tsx index 5350e59850..829d18cf1e 100644 --- a/src/components/views/dialogs/HostSignupDialog.tsx +++ b/src/components/views/dialogs/HostSignupDialog.tsx @@ -168,12 +168,32 @@ export default class HostSignupDialog extends React.PureComponent { + const termsDialog = this.config.termsDialog; + const textComponent = ( + <> +

+ {termsDialog.text} +

+

+ {_t("Learn more in our")}  + + {termsDialog.privacyPolicy.text} + ,  + + {termsDialog.termsOfService.text} + {_t("and")}  + + {termsDialog.cookiePolicy.text} + . +

+ + ); 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, }, ); diff --git a/src/components/views/dialogs/HostSignupDialogTypes.ts b/src/components/views/dialogs/HostSignupDialogTypes.ts index f20a2acb7c..81d844a7c5 100644 --- a/src/components/views/dialogs/HostSignupDialogTypes.ts +++ b/src/components/views/dialogs/HostSignupDialogTypes.ts @@ -53,7 +53,9 @@ interface ILink { interface IHostSignupTermsDialogConfig { acceptText: string; - termsDocuments: Array; + cookiePolicy: ILink; + privacyPolicy: ILink; + termsOfService: ILink; text: string; title: string; }