Skip to content

Commit

Permalink
refactor: changed the variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Feb 8, 2024
1 parent 28e1bf4 commit 28f8067
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/course-unit/course-sequence/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export function useSequenceNavigationMetadata(currentSequenceId, currentUnitId)
const nextUnitId = sequence.unitIds[nextIndex];
nextLink = `/course/${courseId}/container/${nextUnitId}/${currentSequenceId}`;

Check warning on line 44 in src/course-unit/course-sequence/hooks.js

View check run for this annotation

Codecov / codecov/patch

src/course-unit/course-sequence/hooks.js#L43-L44

Added lines #L43 - L44 were not covered by tests
} else if (nextSequenceId) {
const nextUnitId = decodeURIComponent(nextUrl);
nextLink = `/course/${courseId}${nextUnitId}/${nextSequenceId}`;
const pathToNextUnit = decodeURIComponent(nextUrl);
nextLink = `/course/${courseId}${pathToNextUnit}/${nextSequenceId}`;

Check warning on line 47 in src/course-unit/course-sequence/hooks.js

View check run for this annotation

Codecov / codecov/patch

src/course-unit/course-sequence/hooks.js#L46-L47

Added lines #L46 - L47 were not covered by tests
}

let previousLink;
Expand All @@ -54,8 +54,8 @@ export function useSequenceNavigationMetadata(currentSequenceId, currentUnitId)
const previousUnitId = sequence.unitIds[previousIndex];
previousLink = `/course/${courseId}/container/${previousUnitId}/${currentSequenceId}`;

Check warning on line 55 in src/course-unit/course-sequence/hooks.js

View check run for this annotation

Codecov / codecov/patch

src/course-unit/course-sequence/hooks.js#L54-L55

Added lines #L54 - L55 were not covered by tests
} else if (previousSequenceId) {
const previousUnitId = decodeURIComponent(prevUrl);
previousLink = `/course/${courseId}${previousUnitId}/${previousSequenceId}`;
const pathToPreviousUnit = decodeURIComponent(prevUrl);
previousLink = `/course/${courseId}${pathToPreviousUnit}/${previousSequenceId}`;

Check warning on line 58 in src/course-unit/course-sequence/hooks.js

View check run for this annotation

Codecov / codecov/patch

src/course-unit/course-sequence/hooks.js#L57-L58

Added lines #L57 - L58 were not covered by tests
}

return {

Check warning on line 61 in src/course-unit/course-sequence/hooks.js

View check run for this annotation

Codecov / codecov/patch

src/course-unit/course-sequence/hooks.js#L61

Added line #L61 was not covered by tests
Expand Down

0 comments on commit 28f8067

Please sign in to comment.