diff --git a/src/components/app/Root.jsx b/src/components/app/Root.jsx index 6e587a975c..e9a04cf2ec 100644 --- a/src/components/app/Root.jsx +++ b/src/components/app/Root.jsx @@ -35,7 +35,7 @@ const Root = () => { } }, NPROGRESS_DELAY_MS); return () => clearTimeout(timeoutId); - }, [navigation, fetchers, authenticatedUser]); + }, [navigation, fetchers]); // in the special case where there is not authenticated user and we are being told it's the logout // flow, we can show the logout message safely. @@ -56,10 +56,6 @@ const Root = () => { ); } - if (!authenticatedUser.profileImage) { - return null; - } - // User is authenticated, so render the child routes (rest of the app). return ( <> diff --git a/src/components/app/routes/data/services.js b/src/components/app/routes/data/services.js index 5836c1379c..78fd817951 100644 --- a/src/components/app/routes/data/services.js +++ b/src/components/app/routes/data/services.js @@ -1,5 +1,5 @@ import { camelCaseObject, getConfig } from '@edx/frontend-platform'; -import { getAuthenticatedHttpClient, getAuthenticatedUser } from '@edx/frontend-platform/auth'; +import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth'; import { logError, logInfo } from '@edx/frontend-platform/logging'; import { ENTERPRISE_OFFER_STATUS, @@ -367,26 +367,23 @@ export async function fetchSubscriptions(enterpriseUuid) { // Notices export const fetchNotices = async () => { - const authenticatedUser = getAuthenticatedUser(); - const url = new URL(`${getConfig().LMS_BASE_URL}/notices/api/v1/unacknowledged`); - if (authenticatedUser) { - try { - const { data } = await getAuthenticatedHttpClient().get(url.href, {}); - if (data?.results.length > 0) { - const { results } = data; - window.location.assign(`${results[0]}?next=${window.location.href}`); - throw new Error('Redirecting to notice'); - } - return data; - } catch (error) { - // we will just swallow error, as that probably means the notices app is not installed. - // Notices are not necessary for the rest of dashboard to function. - const httpErrorStatus = getErrorResponseStatusCode(error); - if (httpErrorStatus === 404) { - logInfo(`${error}. This probably happened because the notices plugin is not installed on platform.`); - } else { - logError(error); - } + const url = `${getConfig().LMS_BASE_URL}/notices/api/v1/unacknowledged`; + try { + const { data } = await getAuthenticatedHttpClient().get(url); + if (data?.results.length > 0) { + const { results } = data; + window.location.assign(`${results[0]}?next=${window.location.href}`); + throw new Error('Redirecting to notice'); + } + return data; + } catch (error) { + // we will just swallow error, as that probably means the notices app is not installed. + // Notices are not necessary for the rest of dashboard to function. + const httpErrorStatus = getErrorResponseStatusCode(error); + if (httpErrorStatus === 404) { + logInfo(`${error}. This probably happened because the notices plugin is not installed on platform.`); + } else { + logError(error); } } return null;