|
|
@ -31,11 +31,13 @@ function EncryptionPart(props: { credentials: CredentialsDataRemote }) {
|
|
|
|
const credentials = props.credentials;
|
|
|
|
const credentials = props.credentials;
|
|
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
React.useEffect(() => {
|
|
|
|
// FIXME: verify the error is a 404
|
|
|
|
|
|
|
|
store.dispatch<any>(fetchUserInfo(credentials, credentials.credentials.email)).then((fetchedUserInfo: Action<EteSync.UserInfo>) => {
|
|
|
|
store.dispatch<any>(fetchUserInfo(credentials, credentials.credentials.email)).then((fetchedUserInfo: Action<EteSync.UserInfo>) => {
|
|
|
|
setUserInfo(fetchedUserInfo.payload);
|
|
|
|
setUserInfo(fetchedUserInfo.payload);
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch((e: Error) => {
|
|
|
|
// Do nothing.
|
|
|
|
// Do nothing.
|
|
|
|
|
|
|
|
if ((e instanceof EteSync.HTTPError) && (e.status !== 404)) {
|
|
|
|
|
|
|
|
setError(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
}).finally(() => {
|
|
|
|
}).finally(() => {
|
|
|
|
setFetched(true);
|
|
|
|
setFetched(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|