diff options
author | Sebastian <sebasjm@gmail.com> | 2021-11-10 18:10:45 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-11-10 18:11:12 -0300 |
commit | 0ac7433ea7fa952c46062daef1c3de535d92b7f3 (patch) | |
tree | 42ac2856ef47073113bc3c30c600bdf1d6fd73bb /packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | |
parent | ea13e19ece2deeb4ab9731373f68b1dcf5b6fa88 (diff) | |
download | wallet-core-0ac7433ea7fa952c46062daef1c3de535d92b7f3.tar.xz |
confirm personal information fix #7090
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx')
-rw-r--r-- | packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx index 0918c2db5..4b26c38b7 100644 --- a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx @@ -6,6 +6,7 @@ import { DateInput } from "../../components/fields/DateInput"; import { PhoneNumberInput } from "../../components/fields/NumberInput"; import { TextInput } from "../../components/fields/TextInput"; import { useAnastasisContext } from "../../context/anastasis"; +import { ConfirmModal } from "./ConfirmModal"; import { AnastasisClientFrame, withProcessLabel } from "./index"; export function AttributeEntryScreen(): VNode { @@ -18,6 +19,7 @@ export function AttributeEntryScreen(): VNode { const [attrs, setAttrs] = useState<Record<string, string>>( currentIdentityAttributes, ); + const [askUserIfSure, setAskUserIfSure] = useState(false); if (!reducer) { return <div>no reducer in context</div>; @@ -51,12 +53,25 @@ export function AttributeEntryScreen(): VNode { <AnastasisClientFrame title={withProcessLabel(reducer, "Who are you?")} hideNext={hasErrors ? "Complete the form." : undefined} - onNext={() => - reducer.transition("enter_user_attributes", { - identity_attributes: attrs, - }) - } + onNext={async () => setAskUserIfSure(true) } > + {askUserIfSure ? ( + <ConfirmModal + active + onCancel={() => setAskUserIfSure(false)} + description="You can not forget what you had entered" + label="I am sure" + cancelLabel="Wait, I want to check" + onConfirm={() => reducer.transition("enter_user_attributes", { + identity_attributes: attrs, + })} + > + You personal information is used to define the location where your + secret will be safely stored. If you forget what you have entered or + if there is a misspell you will be unable to recover your secret again. + </ConfirmModal> + ) : null} + <div class="columns" style={{ maxWidth: "unset" }}> <div class="column">{fieldList}</div> <div class="column"> |