Skip to content

Commit

Permalink
refactor: address PR reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Mar 7, 2024
1 parent b12621a commit 523ab85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/courseware/course/Course.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const Course = ({
<title>{`${pageTitleBreadCrumbs.join(' | ')} | ${getConfig().SITE_NAME}`}</title>
</Helmet>
<div className="position-relative d-flex align-items-center mb-4 mt-1">
{!navigationDisabled && (
{navigationDisabled || (
<>
<CourseBreadcrumbs
courseId={courseId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const SequenceNavigation = ({
const renderPreviousButton = () => {
const disabled = isFirstUnit;
const prevArrow = isRtl(getLocale()) ? ChevronRight : ChevronLeft;
return !navigationDisabledPrevSequence && (
return navigationDisabledPrevSequence || (
<Button
variant="link"
className="previous-btn"
Expand All @@ -94,7 +94,7 @@ const SequenceNavigation = ({
const disabled = isLastUnit && !exitActive;
const nextArrow = isRtl(getLocale()) ? ChevronLeft : ChevronRight;

return !navigationDisabledNextSequence && (
return navigationDisabledNextSequence || (
<Button
variant="link"
className="next-btn"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function useSequenceNavigationMetadata(currentSequenceId, currentUnitId)
const isLastSequence = sequenceIndex === sequenceIds.length - 1;
const isLastUnitInSequence = unitIndex === sequence.unitIds.length - 1;
const isLastUnit = isLastSequence && isLastUnitInSequence;
const sequenceNavigationDisabled = sequence?.navigationDisabled;
const sequenceNavigationDisabled = sequence.navigationDisabled;
const navigationDisabledPrevSequence = sequenceNavigationDisabled && isFirstUnitInSequence;
const navigationDisabledNextSequence = sequenceNavigationDisabled && isLastUnitInSequence;

Expand Down

0 comments on commit 523ab85

Please sign in to comment.