only redirect if syncError

This commit is contained in:
Sean Yesmunt 2019-10-22 16:43:51 -04:00
parent 07bf3f4916
commit 179f758f4d

View file

@ -189,7 +189,9 @@ function App(props: Props) {
}, [hasVerifiedEmail, syncEnabled, checkSync, hasDeterminedIfNewUser]);
useEffect(() => {
history.push(`/$/${PAGES.AUTH}?redirect=${pathname}`);
if (syncError) {
history.push(`/$/${PAGES.AUTH}?redirect=${pathname}`);
}
}, [syncError, pathname]);
if (!user) {