diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx index 0b5a71b3e..415ee1605 100644 --- a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx +++ b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx @@ -142,23 +142,38 @@ export function ShowTosContentView({ <section style={{ justifyContent: "space-around", display: "flex" }}> <WarningBox> <i18n.Translate> - The exchange reply with a empty terms of service + The exchange replied with a empty terms of service </i18n.Translate> </WarningBox> </section> )} {terms.content && ( <section style={{ justifyContent: "space-around", display: "flex" }}> - {terms.content.type === "xml" && ( - <TermsOfService> - <ExchangeXmlTos doc={terms.content.document} /> - </TermsOfService> - )} - {terms.content.type === "plain" && ( - <div style={{ textAlign: "left" }}> - <pre>{terms.content.content}</pre> - </div> - )} + {terms.content.type === "xml" && + (!terms.content.document ? ( + <WarningBox> + <i18n.Translate> + No terms of service. The exchange replied with a empty + document + </i18n.Translate> + </WarningBox> + ) : ( + <TermsOfService> + <ExchangeXmlTos doc={terms.content.document} /> + </TermsOfService> + ))} + {terms.content.type === "plain" && + (!terms.content.content ? ( + <WarningBox> + <i18n.Translate> + No terms of service. The exchange replied with a empty text + </i18n.Translate> + </WarningBox> + ) : ( + <div style={{ textAlign: "left" }}> + <pre>{terms.content.content}</pre> + </div> + ))} {terms.content.type === "html" && ( <iframe src={terms.content.href.toString()} /> )} |