diff --git a/src/CourseAuthoringRoutes.jsx b/src/CourseAuthoringRoutes.jsx index dd989a4434..36dcc5d97b 100644 --- a/src/CourseAuthoringRoutes.jsx +++ b/src/CourseAuthoringRoutes.jsx @@ -127,7 +127,7 @@ const CourseAuthoringRoutes = () => { element={} /> } /> diff --git a/src/generic/modal-dropzone/useModalDropzone.jsx b/src/generic/modal-dropzone/useModalDropzone.jsx index 8fd6798668..81657d3923 100644 --- a/src/generic/modal-dropzone/useModalDropzone.jsx +++ b/src/generic/modal-dropzone/useModalDropzone.jsx @@ -49,7 +49,8 @@ const useModalDropzone = ({ */ const constructAcceptObject = (types) => types .reduce((acc, type) => { - const mimeType = VALID_IMAGE_TYPES.includes(type) ? 'image/*' : '*/*'; + // eslint-disable-next-line no-nested-ternary + const mimeType = type === 'pdf' ? 'application/pdf' : VALID_IMAGE_TYPES.includes(type) ? 'image/*' : '*/*'; if (!acc[mimeType]) { acc[mimeType] = []; } diff --git a/src/textbooks/textbook-card/TextbooksCard.jsx b/src/textbooks/textbook-card/TextbooksCard.jsx index ba738ecf92..7218a6ddef 100644 --- a/src/textbooks/textbook-card/TextbooksCard.jsx +++ b/src/textbooks/textbook-card/TextbooksCard.jsx @@ -44,7 +44,7 @@ const TextbookCard = ({ const { tabTitle, chapters, id } = textbook; const onPreviewTextbookClick = () => { - window.location.href = `${config.LMS_BASE_URL}/courses/${courseId}/pdfbook/${textbookIndex}/`; + window.open(`${config.LMS_BASE_URL}/courses/${courseId}/pdfbook/${textbookIndex}/`, '_blank'); }; const handleDeleteButtonSubmit = () => {