diff --git a/client/src/client-only-routes/show-settings.tsx b/client/src/client-only-routes/show-settings.tsx
index e8cf2e1cf7d..bdfd8925644 100644
--- a/client/src/client-only-routes/show-settings.tsx
+++ b/client/src/client-only-routes/show-settings.tsx
@@ -1,5 +1,5 @@
import { Grid } from '@freecodecamp/react-bootstrap';
-import React from 'react';
+import React, { useRef } from 'react';
import Helmet from 'react-helmet';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
@@ -143,12 +143,13 @@ export function ShowSettings(props: ShowSettingsProps): JSX.Element {
verifyCert,
userToken
} = props;
+ const isSignedInRef = useRef(isSignedIn);
if (showLoading) {
return ;
}
- if (!isSignedIn) {
+ if (!isSignedInRef.current) {
navigate(`${apiLocation}/signin`);
return ;
}
diff --git a/client/src/redux/settings/danger-zone-saga.js b/client/src/redux/settings/danger-zone-saga.js
index 10d41d4d39d..d9d4e6741ff 100644
--- a/client/src/redux/settings/danger-zone-saga.js
+++ b/client/src/redux/settings/danger-zone-saga.js
@@ -19,7 +19,7 @@ function* deleteAccountSaga() {
);
// remove current user information from application state
yield put(resetUserData());
- yield call(navigate, '/');
+ yield call(navigate, '/learn');
} catch (e) {
yield put(deleteAccountError(e));
}