diff options
author | Sebastian <sebasjm@gmail.com> | 2023-12-14 07:20:47 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-12-14 07:20:47 -0300 |
commit | 2fd4481b041f946431004e40c7a4ffcdd620a9cb (patch) | |
tree | de920514d77076f3751cc66ef99130d52f91031e /packages/taler-wallet-webextension/src/wallet/AddExchange/views.tsx | |
parent | 4db720c081ca830db81363e9a8acfd4dddbf9120 (diff) | |
download | wallet-core-2fd4481b041f946431004e40c7a4ffcdd620a9cb.tar.xz |
refactor ToS display
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/AddExchange/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/AddExchange/views.tsx | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/AddExchange/views.tsx b/packages/taler-wallet-webextension/src/wallet/AddExchange/views.tsx index 87ea5eae3..53a46fe02 100644 --- a/packages/taler-wallet-webextension/src/wallet/AddExchange/views.tsx +++ b/packages/taler-wallet-webextension/src/wallet/AddExchange/views.tsx @@ -143,7 +143,7 @@ export function VerifyView({ } e.preventDefault() }}> - {ex.href}</a></li> + {ex.href}</a></li> })} </ul> </section> @@ -159,8 +159,6 @@ export function ConfirmView({ }: State.Confirm): VNode { const { i18n } = useTranslationContext(); - const [accepted, setAccepted] = useState(false); - return ( <Fragment> <section> @@ -175,27 +173,27 @@ export function ConfirmView({ </div> </section> - <TermsOfService key="terms" exchangeUrl={url} onChange={setAccepted} /> - <footer> - <Button - key="cancel" - variant="contained" - color="secondary" - onClick={onCancel} - > - <i18n.Translate>Cancel</i18n.Translate> - </Button> - <Button - key="add" - variant="contained" - color="success" - disabled={!accepted} - onClick={onConfirm} - > - <i18n.Translate>Add exchange</i18n.Translate> - </Button> - </footer> + <TermsOfService key="terms" exchangeUrl={url} > + <footer> + <Button + key="cancel" + variant="contained" + color="secondary" + onClick={onCancel} + > + <i18n.Translate>Cancel</i18n.Translate> + </Button> + <Button + key="add" + variant="contained" + color="success" + onClick={onConfirm} + > + <i18n.Translate>Add exchange</i18n.Translate> + </Button> + </footer> + </TermsOfService> </Fragment> ); } |