Skip to content

Commit cd96538

Browse files
committed
Use standard loginlink
1 parent b90541d commit cd96538

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/pages/details/common/resource-box/resource-box.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import {FormattedMessage} from 'react-intl';
3+
import linkHelper from '~/helpers/link';
34

45
const settings = window.SETTINGS;
56

@@ -52,7 +53,7 @@ export function instructorResourceBoxPermissions(resourceData, userStatus, searc
5253
const encodedLocation = encodeLocation(search);
5354
const loginUrl = userStatus.userInfo?.id ?
5455
`${settings.accountHref}/faculty_access/apply?r=${encodedLocation}` :
55-
`${process.env.API_ORIGIN}/oxauth/login/?next=${encodedLocation}`;
56+
linkHelper.loginLink();
5657

5758
return resourceBoxPermissions({
5859
resourceData,
@@ -62,18 +63,17 @@ export function instructorResourceBoxPermissions(resourceData, userStatus, searc
6263
}
6364

6465
// Utility function for student resources
65-
export function studentResourceBoxPermissions(resourceData, userStatus, search) {
66+
export function studentResourceBoxPermissions(resourceData, userStatus) {
6667
const resourceStatus = () => {
6768
if (resourceData.resourceUnlocked || userStatus.isStudent || userStatus.isInstructor) {
6869
return 'unlocked';
6970
}
7071
return 'locked';
7172
};
72-
const loginUrl = `${process.env.API_ORIGIN}/oxauth/login/?next=${encodeLocation(search)}`;
7373

7474
return resourceBoxPermissions({
7575
resourceData,
7676
resourceStatus,
77-
loginUrl
77+
loginUrl: linkHelper.loginLink()
7878
});
7979
}

0 commit comments

Comments
 (0)