diff --git a/src/course-unit/hooks.jsx b/src/course-unit/hooks.jsx index a4765a896e..ae5dfffa88 100644 --- a/src/course-unit/hooks.jsx +++ b/src/course-unit/hooks.jsx @@ -38,6 +38,7 @@ import { import { PUBLISH_TYPES } from './constants'; import { useCopyToClipboard } from '../generic/clipboard'; +import { createCorrectInternalRoute } from '../utils'; // eslint-disable-next-line import/prefer-default-export export const useCourseUnit = ({ courseId, blockId }) => { @@ -137,7 +138,8 @@ export const useCourseUnit = ({ courseId, blockId }) => { }; const handleNavigateToTargetUnit = () => { - navigate(`/course/${courseId}/container/${movedXBlockParams.targetParentLocator}`); + const correctInternalRoute = createCorrectInternalRoute(`/course/${courseId}/container/${movedXBlockParams.targetParentLocator}`); + navigate(correctInternalRoute); }; useEffect(() => { diff --git a/src/course-unit/messages.js b/src/course-unit/messages.js index 32ea37ef6c..d596d8c6ea 100644 --- a/src/course-unit/messages.js +++ b/src/course-unit/messages.js @@ -24,26 +24,32 @@ const messages = defineMessages({ alertMoveSuccessTitle: { id: 'course-authoring.course-unit.alert.xblock.move.success.title', defaultMessage: 'Success!', + description: 'Title for the success alert when an XBlock is moved successfully', }, alertMoveSuccessDescription: { id: 'course-authoring.course-unit.alert.xblock.move.success.description', defaultMessage: '{title} has been moved.', + description: 'Description for the success alert when an XBlock is moved successfully', }, alertMoveCancelTitle: { id: 'course-authoring.course-unit.alert.xblock.move.cancel.title', defaultMessage: 'Move cancelled.', + description: 'Title for the alert when moving an XBlock is cancelled', }, alertMoveCancelDescription: { id: 'course-authoring.course-unit.alert.xblock.move.cancel.description', defaultMessage: '{title} has been moved back to its original location.', + description: 'Description for the alert when moving an XBlock is cancelled and the XBlock is moved back to its original location', }, undoMoveButton: { id: 'course-authoring.course-unit.alert.xblock.move.undo.btn.text', defaultMessage: 'Undo move', + description: 'Text for the button allowing users to undo a move action of an XBlock', }, newLocationButton: { id: 'course-authoring.course-unit.alert.xblock.new.location.btn.text', defaultMessage: 'Take me to the new location', + description: 'Text for the button allowing users to navigate to the new location after an XBlock has been moved', }, });