diff --git a/.env b/.env index 52ce6a0f4..1feaf21df 100644 --- a/.env +++ b/.env @@ -10,6 +10,8 @@ LOGIN_URL='' LOGOUT_URL='' MARKETING_SITE_BASE_URL='' ORDER_HISTORY_URL='' +ACCOUNT_SETTINGS_URL='' +ACCOUNT_PROFILE_URL='' REFRESH_ACCESS_TOKEN_ENDPOINT='' SEGMENT_KEY='' SITE_NAME='' diff --git a/.env.development b/.env.development index 6b42cbabe..5694a28d8 100644 --- a/.env.development +++ b/.env.development @@ -3,7 +3,9 @@ PORT=1995 ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload' BASE_URL='localhost:1995' CREDENTIALS_BASE_URL='http://localhost:18150' +ACCOUNT_SETTINGS_URL=http://localhost:1997 CSRF_TOKEN_API_PATH='/csrf/api/v1/token' +ACCOUNT_PROFILE_URL=http://localhost:1995 ECOMMERCE_BASE_URL='http://localhost:18130' LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference' LMS_BASE_URL='http://localhost:18000' diff --git a/.env.test b/.env.test index b79d85ca5..716cae188 100644 --- a/.env.test +++ b/.env.test @@ -5,6 +5,8 @@ CSRF_TOKEN_API_PATH='/csrf/api/v1/token' ECOMMERCE_BASE_URL='http://localhost:18130' LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference' LMS_BASE_URL='http://localhost:18000' +ACCOUNT_SETTINGS_URL='http://localhost:1997' +ACCOUNT_PROFILE_URL='http://localhost:1995' LOGIN_URL='http://localhost:18000/login' LOGOUT_URL='http://localhost:18000/logout' MARKETING_SITE_BASE_URL='http://localhost:18000' diff --git a/src/profile/ProfilePage.jsx b/src/profile/ProfilePage.jsx index 7819d7b94..f0a140114 100644 --- a/src/profile/ProfilePage.jsx +++ b/src/profile/ProfilePage.jsx @@ -50,10 +50,9 @@ class ProfilePage extends React.Component { super(props, context); const credentialsBaseUrl = context.config.CREDENTIALS_BASE_URL; - this.state = { viewMyRecordsUrl: credentialsBaseUrl ? `${credentialsBaseUrl}/records` : null, - accountSettingsUrl: `${context.config.LMS_BASE_URL}/account/settings`, + accountSettingsUrl: context.config.ACCOUNT_SETTINGS_URL, }; this.handleSaveProfilePhoto = this.handleSaveProfilePhoto.bind(this);