Skip to content

Commit

Permalink
fix: [AXIMST-371] fix correct internal route on create new unit (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihor-romaniuk authored and PKulkoRaccoonGang committed Feb 15, 2024
1 parent d8dcf8d commit 5e9bc34
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useNavigate } from 'react-router-dom';

import { changeEditTitleFormOpen, updateQueryPendingStatus } from '../../data/slice';
import { getCourseId, getSequenceId } from '../../data/selectors';
import { createCorrectInternalRoute } from '../../../utils';
import messages from '../messages';
import { useIndexOfLastVisibleChild } from '../hooks';
import SequenceNavigationDropdown from './SequenceNavigationDropdown';
Expand All @@ -30,7 +29,7 @@ const SequenceNavigationTabs = ({ unitIds, unitId, handleCreateNewCourseXblock }
const handleAddNewSequenceUnit = () => {
dispatch(updateQueryPendingStatus(true));
handleCreateNewCourseXblock({ parentLocator: sequenceId, category: 'vertical', displayName: 'Unit' }, ({ courseKey, locator }) => {
navigate(createCorrectInternalRoute(`/course/${courseKey}/container/${locator}/${sequenceId}`), courseId);
navigate(`/course/${courseKey}/container/${locator}/${sequenceId}`, courseId);
dispatch(changeEditTitleFormOpen(true));

Check warning on line 33 in src/course-unit/course-sequence/sequence-navigation/SequenceNavigationTabs.jsx

View check run for this annotation

Codecov / codecov/patch

src/course-unit/course-sequence/sequence-navigation/SequenceNavigationTabs.jsx#L32-L33

Added lines #L32 - L33 were not covered by tests
});
};
Expand Down

0 comments on commit 5e9bc34

Please sign in to comment.