diff --git a/src/course-home/progress-tab/grades/course-grade/CurrentGradeTooltip.jsx b/src/course-home/progress-tab/grades/course-grade/CurrentGradeTooltip.jsx index 186020e1..e5004294 100644 --- a/src/course-home/progress-tab/grades/course-grade/CurrentGradeTooltip.jsx +++ b/src/course-home/progress-tab/grades/course-grade/CurrentGradeTooltip.jsx @@ -2,7 +2,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; -import { injectIntl, intlShape, isRtl } from '@edx/frontend-platform/i18n'; +import { + getLocale, injectIntl, intlShape, isRtl, +} from '@edx/frontend-platform/i18n'; import { OverlayTrigger, Popover } from '@edx/paragon'; import { useModel } from '../../../../generic/model-store'; @@ -25,7 +27,9 @@ function CurrentGradeTooltip({ intl, tooltipClassName }) { let currentGradeDirection = currentGrade < 50 ? '' : '-'; - if (isRtl) { + const isLocaleRtl = isRtl(getLocale()); + + if (isLocaleRtl) { currentGradeDirection = currentGrade < 50 ? '-' : ''; } @@ -43,14 +47,14 @@ function CurrentGradeTooltip({ intl, tooltipClassName }) { )} > - - + + diff --git a/src/course-home/progress-tab/grades/course-grade/PassingGradeTooltip.jsx b/src/course-home/progress-tab/grades/course-grade/PassingGradeTooltip.jsx index ee8b5cb3..cc0f0497 100644 --- a/src/course-home/progress-tab/grades/course-grade/PassingGradeTooltip.jsx +++ b/src/course-home/progress-tab/grades/course-grade/PassingGradeTooltip.jsx @@ -1,15 +1,19 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { injectIntl, intlShape, isRtl } from '@edx/frontend-platform/i18n'; +import { + getLocale, injectIntl, intlShape, isRtl, +} from '@edx/frontend-platform/i18n'; import { OverlayTrigger, Popover } from '@edx/paragon'; import messages from '../messages'; function PassingGradeTooltip({ intl, passingGrade, tooltipClassName }) { + const isLocaleRtl = isRtl(getLocale()); + let passingGradeDirection = passingGrade < 50 ? '' : '-'; - if (isRtl) { + if (isLocaleRtl) { passingGradeDirection = passingGrade < 50 ? '-' : ''; } @@ -27,15 +31,15 @@ function PassingGradeTooltip({ intl, passingGrade, tooltipClassName }) { )} > - - + +