Skip to content

Commit

Permalink
AA-813: fix progress tab related links (openedx#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carla Duarte authored May 26, 2021
1 parent 9d07f26 commit 519cf27
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { useSelector } from 'react-redux';
import { Link } from 'react-router-dom';

import { getConfig } from '@edx/frontend-platform';
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { Hyperlink } from '@edx/paragon';
import { useModel } from '../../../../generic/model-store';

import DetailedGradesTable from './DetailedGradesTable';
Expand All @@ -21,13 +22,9 @@ function DetailedGrades({ intl }) {
const hasSectionScores = sectionScores.length > 0;

const outlineLink = (
<Link
className="text-dark-700"
style={{ textDecoration: 'underline' }}
to={`/course/${courseId}/home`}
>
<Hyperlink className="muted-link inline-link" destination={`${getConfig().LMS_BASE_URL}/courses/${courseId}/course`}>
{intl.formatMessage(messages.courseOutline)}
</Link>
</Hyperlink>
);

return (
Expand Down
11 changes: 8 additions & 3 deletions src/course-home/progress-tab/related-links/RelatedLinks.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { useSelector } from 'react-redux';
import { Link } from 'react-router-dom';
import { getConfig } from '@edx/frontend-platform';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { Hyperlink } from '@edx/paragon';

import messages from './messages';

Expand All @@ -15,11 +16,15 @@ function RelatedLinks({ intl }) {
<h3 className="h4">{intl.formatMessage(messages.relatedLinks)}</h3>
<ul className="pl-4">
<li>
<Link to={`course/${courseId}/dates`}>{intl.formatMessage(messages.datesCardLink)}</Link>
<Hyperlink destination={`${getConfig().LMS_BASE_URL}/courses/${courseId}/dates`}>
{intl.formatMessage(messages.datesCardLink)}
</Hyperlink>
<p>{intl.formatMessage(messages.datesCardDescription)}</p>
</li>
<li>
<Link to={`course/${courseId}/home`}>{intl.formatMessage(messages.outlineCardLink)}</Link>
<Hyperlink destination={`${getConfig().LMS_BASE_URL}/courses/${courseId}/course`}>
{intl.formatMessage(messages.outlineCardLink)}
</Hyperlink>
<p>{intl.formatMessage(messages.outlineCardDescription)}</p>
</li>
</ul>
Expand Down

0 comments on commit 519cf27

Please sign in to comment.