From 689ae65e2987294ce4dda2d43f35c209ab7ad155 Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Fri, 29 Mar 2024 13:35:12 +0200 Subject: [PATCH] fix: [AXIMST-655] fixed position of the view-port after loading the unit page (#217) --- src/course-unit/CourseUnit.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/course-unit/CourseUnit.jsx b/src/course-unit/CourseUnit.jsx index c74322d314..89d0143776 100644 --- a/src/course-unit/CourseUnit.jsx +++ b/src/course-unit/CourseUnit.jsx @@ -70,6 +70,10 @@ const CourseUnit = ({ courseId }) => { setUnitXBlocks(courseVerticalChildren.children); }, [courseVerticalChildren.children]); + useEffect(() => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }, []); + const { isShow: isShowProcessingNotification, title: processingNotificationTitle,