Skip to content

Commit

Permalink
feat: add like-dislike component
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-canon committed Nov 28, 2024
1 parent 34cc9ef commit 2ac3a9b
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions src/courseware/course/sequence/Sequence.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { useIntl } from '@edx/frontend-platform/i18n';
import { useSelector } from 'react-redux';
import SequenceExamWrapper from '@edx/frontend-lib-special-exams';
import { LikeDislikeUnit } from '@edunext/frontend-essentials';

import PageLoading from '@src/generic/PageLoading';
import { useModel } from '@src/generic/model-store';
Expand Down Expand Up @@ -147,19 +148,25 @@ const Sequence = ({
const gated = sequence && sequence.gatedContent !== undefined && sequence.gatedContent.gated;

const renderUnitNavigation = (isAtTop) => (
<UnitNavigation
sequenceId={sequenceId}
unitId={unitId}
isAtTop={isAtTop}
onClickPrevious={() => {
logEvent('edx.ui.lms.sequence.previous_selected', 'bottom');
handlePrevious();
}}
onClickNext={() => {
logEvent('edx.ui.lms.sequence.next_selected', 'bottom');
handleNext();
}}
/>
<>
<div className="nelp-container">
<LikeDislikeUnit courseId={courseId} unitId={unitId} />
</div>

<UnitNavigation
sequenceId={sequenceId}
unitId={unitId}
isAtTop={isAtTop}
onClickPrevious={() => {
logEvent('edx.ui.lms.sequence.previous_selected', 'bottom');
handlePrevious();
}}
onClickNext={() => {
logEvent('edx.ui.lms.sequence.next_selected', 'bottom');
handleNext();
}}
/>
</>
);

const defaultContent = (
Expand Down

0 comments on commit 2ac3a9b

Please sign in to comment.