password error handling
This commit is contained in:
parent
9127266956
commit
ee1a37a806
5 changed files with 9 additions and 20 deletions
|
@ -137,7 +137,7 @@
|
|||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#e10295b5ec2ef42426755ed9fd50bd250b0d76dd",
|
||||
"lbryinc": "lbryio/lbryinc#9440717a00d2fbb2e3226aaa2388f4698f324be2",
|
||||
"lbryinc": "lbryio/lbryinc#48347494230c6d1610cfd1c0bef23924e7428288",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
"lodash-es": "^4.17.14",
|
||||
|
|
|
@ -6,7 +6,7 @@ import { selectUser, selectAccessToken, selectUserVerifiedEmail } from 'redux/se
|
|||
import { selectUnclaimedRewards } from 'redux/selectors/rewards';
|
||||
import { doFetchChannelListMine, SETTINGS } from 'lbry-redux';
|
||||
import { makeSelectClientSetting, selectLoadedLanguages, selectThemePath } from 'redux/selectors/settings';
|
||||
import { selectIsUpgradeAvailable, selectAutoUpdateDownloaded } from 'redux/selectors/app';
|
||||
import { selectIsUpgradeAvailable, selectAutoUpdateDownloaded, selectModal } from 'redux/selectors/app';
|
||||
import { doGetWalletSyncPreference, doSetLanguage } from 'redux/actions/settings';
|
||||
import { doSyncSubscribe } from 'redux/actions/syncwrapper';
|
||||
import {
|
||||
|
@ -30,6 +30,7 @@ const select = state => ({
|
|||
uploadCount: selectUploadCount(state),
|
||||
rewards: selectUnclaimedRewards(state),
|
||||
isAuthenticated: selectUserVerifiedEmail(state),
|
||||
currentModal: selectModal(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
|
|
|
@ -79,6 +79,7 @@ type Props = {
|
|||
socketConnect: () => void,
|
||||
syncSubscribe: () => void,
|
||||
syncEnabled: boolean,
|
||||
currentModal: any,
|
||||
};
|
||||
|
||||
function App(props: Props) {
|
||||
|
@ -103,6 +104,7 @@ function App(props: Props) {
|
|||
setReferrer,
|
||||
isAuthenticated,
|
||||
syncSubscribe,
|
||||
currentModal,
|
||||
} = props;
|
||||
|
||||
const appRef = useRef();
|
||||
|
@ -262,7 +264,7 @@ function App(props: Props) {
|
|||
}, [user, setReadyForPrefs]);
|
||||
|
||||
useEffect(() => {
|
||||
if (syncError && isAuthenticated && !pathname.includes(PAGES.AUTH_WALLET_PASSWORD)) {
|
||||
if (syncError && isAuthenticated && !pathname.includes(PAGES.AUTH_WALLET_PASSWORD) && !currentModal) {
|
||||
history.push(`/$/${PAGES.AUTH_WALLET_PASSWORD}?redirect=${pathname}`);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// @flow
|
||||
import * as PAGES from 'constants/pages';
|
||||
import * as MODALS from 'constants/modal_types';
|
||||
import React from 'react';
|
||||
import Button from 'component/button';
|
||||
|
@ -18,20 +17,7 @@ type Props = {
|
|||
};
|
||||
|
||||
function SyncToggle(props: Props) {
|
||||
const {
|
||||
verifiedEmail,
|
||||
getSyncError,
|
||||
history,
|
||||
location: { pathname },
|
||||
openModal,
|
||||
syncEnabled,
|
||||
disabled,
|
||||
} = props;
|
||||
|
||||
if (getSyncError) {
|
||||
history.push(`/$/${PAGES.AUTH}?redirect=${pathname}&immediate=true`);
|
||||
return null;
|
||||
}
|
||||
const { verifiedEmail, openModal, syncEnabled, disabled } = props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
|
@ -6419,9 +6419,9 @@ lbry-redux@lbryio/lbry-redux#e10295b5ec2ef42426755ed9fd50bd250b0d76dd:
|
|||
reselect "^3.0.0"
|
||||
uuid "^3.3.2"
|
||||
|
||||
lbryinc@lbryio/lbryinc#9440717a00d2fbb2e3226aaa2388f4698f324be2:
|
||||
lbryinc@lbryio/lbryinc#48347494230c6d1610cfd1c0bef23924e7428288:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/9440717a00d2fbb2e3226aaa2388f4698f324be2"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/48347494230c6d1610cfd1c0bef23924e7428288"
|
||||
dependencies:
|
||||
reselect "^3.0.0"
|
||||
|
||||
|
|
Loading…
Reference in a new issue