diff --git a/.env b/.env index 2291ec64..7c46f298 100644 --- a/.env +++ b/.env @@ -42,3 +42,4 @@ ENABLE_NOTICES='' CAREER_LINK_URL='' OPTIMIZELY_FULL_STACK_SDK_KEY='' EXPERIMENT_08_23_VAN_PAINTED_DOOR=true +ENABLE_EDX_PERSONAL_DASHBOARD=false diff --git a/.env.development b/.env.development index 78e4c40a..91d7bd03 100644 --- a/.env.development +++ b/.env.development @@ -48,3 +48,4 @@ ACCOUNT_PROFILE_URL='http://localhost:1995' ENABLE_NOTICES='' CAREER_LINK_URL='' OPTIMIZELY_FULL_STACK_SDK_KEY='' +ENABLE_EDX_PERSONAL_DASHBOARD=false diff --git a/.env.test b/.env.test index 09cf4b36..1ed18959 100644 --- a/.env.test +++ b/.env.test @@ -48,3 +48,4 @@ ENABLE_NOTICES='' CAREER_LINK_URL='' OPTIMIZELY_FULL_STACK_SDK_KEY='SDK Key' EXPERIMENT_08_23_VAN_PAINTED_DOOR=true +ENABLE_EDX_PERSONAL_DASHBOARD=true diff --git a/src/config/index.js b/src/config/index.js index 447b1979..5efd3d13 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -17,6 +17,7 @@ const configuration = { ENABLE_NOTICES: process.env.ENABLE_NOTICES || null, CAREER_LINK_URL: process.env.CAREER_LINK_URL || null, LOGO_URL: process.env.LOGO_URL, + ENABLE_EDX_PERSONAL_DASHBOARD: process.env.ENABLE_EDX_PERSONAL_DASHBOARD === 'true', }; const features = {}; diff --git a/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.jsx b/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.jsx index eaa74486..a30a0cfd 100644 --- a/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.jsx +++ b/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.jsx @@ -29,16 +29,21 @@ export const AuthenticatedUserDropdown = () => { - {formatMessage(messages.dashboardSwitch)} - - {formatMessage(messages.dashboardPersonal)} - - {!!dashboard && ( - - {dashboard.label} {formatMessage(messages.dashboard)} - + { getConfig().ENABLE_EDX_PERSONAL_DASHBOARD && ( + <> + {formatMessage(messages.dashboardSwitch)} + + {formatMessage(messages.dashboardPersonal)} + + {!!dashboard && ( + + {dashboard.label} {formatMessage(messages.dashboard)} + + )} + + )} - + {!dashboard && getConfig().CAREER_LINK_URL && ( {formatMessage(messages.career)} diff --git a/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.test.jsx b/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.test.jsx index f4ec3bae..c23daad0 100644 --- a/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.test.jsx +++ b/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.test.jsx @@ -46,6 +46,7 @@ const config = { SUPPORT_URL: 'http://localhost:18000/support', CAREER_LINK_URL: 'http://localhost:18000/career', LMS_BASE_URL: 'http:/localhost:18000', + ENABLE_EDX_PERSONAL_DASHBOARD: true, }; getConfig.mockReturnValue(config);