Skip to content

Commit

Permalink
fix: linter problems
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvente authored and mariajgrimaldi committed Feb 13, 2024
1 parent 1df4c23 commit 50551a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,13 @@ describe('Sequence Navigation', () => {
sequenceId: sequenceBlocks[0].id,
onNavigate: jest.fn(),
};
render(<SequenceNavigation {...testData} unitId={unitBlocks[unitBlocks.length - 1].id} />, { store: testStore, wrapWithRouter: true });
render(
<SequenceNavigation
{...testData}
unitId={unitBlocks[unitBlocks.length - 1].id}
/>,
{ store: testStore, wrapWithRouter: true },
);
expect(screen.queryByRole('link', { name: /next/i })).not.toBeInTheDocument();
});
});
5 changes: 4 additions & 1 deletion src/courseware/course/sequence/sequence-navigation/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export function useSequenceNavigationMetadata(currentSequenceId, currentUnitId)
// If we don't know the sequence and unit yet, then assume no.
if (courseStatus !== 'loaded' || sequenceStatus !== 'loaded' || !currentSequenceId || !currentUnitId) {
return {
isFirstUnit: false, isLastUnit: false, navigationDisabledNextSequence: false, navigationDisabledPrevSequence: false,
isFirstUnit: false,
isLastUnit: false,
navigationDisabledNextSequence: false,
navigationDisabledPrevSequence: false,
};
}

Expand Down

0 comments on commit 50551a0

Please sign in to comment.