Skip to content

Commit 5ee8a8c

Browse files
UvgenGenarbrandes
authored andcommitted
feat: Account pages. Updated menu items urls.
1 parent 536d674 commit 5ee8a8c

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
2+
ACCOUNT_PROFILE_URL=http://localhost:1995
3+
ACCOUNT_SETTINGS_URL=http://localhost:1997
24
BASE_URL=localhost:8080
35
CREDENTIALS_BASE_URL=http://localhost:18150
46
CSRF_TOKEN_API_PATH=/csrf/api/v1/token

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Environment Variables
2626
Defaults to "localhost" in development.
2727
* ``LOGO_URL`` - The URL of the site's logo. This logo is displayed in the header.
2828
* ``ORDER_HISTORY_URL`` - The URL of the order history page.
29+
* ``ACCOUNT_PROFILE_URL`` - The URL of the account profile page.
30+
* ``ACCOUNT_SETTINGS_URL`` - The URL of the account settings page.
2931
* ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out
3032
menu items when truthy. This is intended to be used in micro-frontends like
3133
frontend-app-authentication in which these menus are considered distractions from the user's task.

src/Header.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ const Header = ({ intl }) => {
5555
},
5656
{
5757
type: 'item',
58-
href: `${config.LMS_BASE_URL}/u/${authenticatedUser.username}`,
58+
href: `${config.ACCOUNT_PROFILE_URL}/u/${authenticatedUser.username}`,
5959
content: intl.formatMessage(messages['header.user.menu.profile']),
6060
},
6161
{
6262
type: 'item',
63-
href: `${config.LMS_BASE_URL}/account/settings`,
63+
href: config.ACCOUNT_SETTINGS_URL,
6464
content: intl.formatMessage(messages['header.user.menu.account.settings']),
6565
},
6666
{

src/learning-header/AuthenticatedUserDropdown.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ const AuthenticatedUserDropdown = ({ intl, username }) => {
2929
</Dropdown.Toggle>
3030
<Dropdown.Menu className="dropdown-menu-right">
3131
{dashboardMenuItem}
32-
<Dropdown.Item href={`${getConfig().LMS_BASE_URL}/u/${username}`}>
32+
<Dropdown.Item href={`${getConfig().ACCOUNT_PROFILE_URL}/u/${username}`}>
3333
{intl.formatMessage(messages.profile)}
3434
</Dropdown.Item>
35-
<Dropdown.Item href={`${getConfig().LMS_BASE_URL}/account/settings`}>
35+
<Dropdown.Item href={getConfig().ACCOUNT_SETTINGS_URL}>
3636
{intl.formatMessage(messages.account)}
3737
</Dropdown.Item>
3838
{ getConfig().ORDER_HISTORY_URL && (

src/setupTest.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Enzyme.configure({ adapter: new Adapter() });
2222
// These configuration values are usually set in webpack's EnvironmentPlugin however
2323
// Jest does not use webpack so we need to set these so for testing
2424
process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload';
25+
process.env.ACCOUNT_PROFILE_URL = 'http://localhost:1995';
26+
process.env.ACCOUNT_SETTINGS_URL = 'http://localhost:1997';
2527
process.env.BASE_URL = 'localhost:1995';
2628
process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150';
2729
process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token';

0 commit comments

Comments
 (0)