aboutsummaryrefslogtreecommitdiff
path: root/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSetup.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-11-12 13:12:27 -0300
committerSebastian <sebasjm@gmail.com>2021-11-12 13:12:27 -0300
commit38b84bb8051db2f03b152d66c34a1cb4c8944a12 (patch)
tree1e7a23bacb5287a53da51f93faee8667292c56ee /packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSetup.tsx
parent377e78e8543b67c22798479fcf2d2f8d1dae5b28 (diff)
downloadwallet-core-38b84bb8051db2f03b152d66c34a1cb4c8944a12.tar.xz
fix #7059
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSetup.tsx')
-rw-r--r--packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSetup.tsx35
1 files changed, 30 insertions, 5 deletions
diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSetup.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSetup.tsx
index 6c8d36bcf..04e00500c 100644
--- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSetup.tsx
+++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSetup.tsx
@@ -48,6 +48,10 @@ export function AuthMethodPostSetup({
: !country
? "The country is missing"
: undefined;
+
+ function goNextIfNoErrors(): void {
+ if (!errors) addPostAuth();
+ }
return (
<AnastasisClientFrame hideNav title="Add postal authentication">
<p>
@@ -56,19 +60,40 @@ export function AuthMethodPostSetup({
will receive in a letter to that address.
</p>
<div>
- <TextInput grabFocus label="Full Name" bind={[fullName, setFullName]} />
+ <TextInput
+ grabFocus
+ label="Full Name"
+ bind={[fullName, setFullName]}
+ onConfirm={goNextIfNoErrors}
+ />
</div>
<div>
- <TextInput label="Street" bind={[street, setStreet]} />
+ <TextInput
+ onConfirm={goNextIfNoErrors}
+ label="Street"
+ bind={[street, setStreet]}
+ />
</div>
<div>
- <TextInput label="City" bind={[city, setCity]} />
+ <TextInput
+ onConfirm={goNextIfNoErrors}
+ label="City"
+ bind={[city, setCity]}
+ />
</div>
<div>
- <TextInput label="Postal Code" bind={[postcode, setPostcode]} />
+ <TextInput
+ onConfirm={goNextIfNoErrors}
+ label="Postal Code"
+ bind={[postcode, setPostcode]}
+ />
</div>
<div>
- <TextInput label="Country" bind={[country, setCountry]} />
+ <TextInput
+ onConfirm={goNextIfNoErrors}
+ label="Country"
+ bind={[country, setCountry]}
+ />
</div>
{configured.length > 0 && (