|
|
@ -22,8 +22,9 @@ function EncryptionPart(props: { credentials: CredentialsType, onEncryptionFormS
|
|
|
|
const credentials = props.credentials.value!;
|
|
|
|
const credentials = props.credentials.value!;
|
|
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
React.useEffect(() => {
|
|
|
|
store.dispatch<any>(fetchUserInfo(credentials, credentials.credentials.email)).then((userInfo: any) => {
|
|
|
|
// FIXME: verify the error is a 404
|
|
|
|
setIsNewUser(userInfo.error);
|
|
|
|
store.dispatch<any>(fetchUserInfo(credentials, credentials.credentials.email)).catch(() => {
|
|
|
|
|
|
|
|
setIsNewUser(true);
|
|
|
|
}).finally(() => {
|
|
|
|
}).finally(() => {
|
|
|
|
setFetched(true);
|
|
|
|
setFetched(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|