Fix Yt sync page
This commit is contained in:
parent
7757960d96
commit
45de6ab822
1 changed files with 6 additions and 3 deletions
|
@ -85,6 +85,7 @@ const Header = (props: Props) => {
|
||||||
const isSignUpPage = pathname.includes(PAGES.AUTH);
|
const isSignUpPage = pathname.includes(PAGES.AUTH);
|
||||||
const isSignInPage = pathname.includes(PAGES.AUTH_SIGNIN);
|
const isSignInPage = pathname.includes(PAGES.AUTH_SIGNIN);
|
||||||
const isPwdResetPage = pathname.includes(PAGES.AUTH_PASSWORD_RESET);
|
const isPwdResetPage = pathname.includes(PAGES.AUTH_PASSWORD_RESET);
|
||||||
|
const iYTSyncPage = pathname.includes(PAGES.YOUTUBE_SYNC);
|
||||||
|
|
||||||
// For pages that allow for "backing out", shows a backout option instead of the Home logo
|
// For pages that allow for "backing out", shows a backout option instead of the Home logo
|
||||||
const canBackout = Boolean(backout);
|
const canBackout = Boolean(backout);
|
||||||
|
@ -255,12 +256,14 @@ const Header = (props: Props) => {
|
||||||
// className="button--header-close"
|
// className="button--header-close"
|
||||||
icon={ICONS.REMOVE}
|
icon={ICONS.REMOVE}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
clearEmailEntry();
|
if (!iYTSyncPage) {
|
||||||
clearPasswordEntry();
|
clearEmailEntry();
|
||||||
|
clearPasswordEntry();
|
||||||
|
}
|
||||||
|
|
||||||
if (syncError) signOut();
|
if (syncError) signOut();
|
||||||
|
|
||||||
if ((isSignInPage && !emailToVerify) || isSignUpPage || isPwdResetPage) {
|
if ((isSignInPage && !emailToVerify) || isSignUpPage || isPwdResetPage || iYTSyncPage) {
|
||||||
goBack();
|
goBack();
|
||||||
} else {
|
} else {
|
||||||
push('/');
|
push('/');
|
||||||
|
|
Loading…
Add table
Reference in a new issue