Skip to content

Commit 826f138

Browse files
* fix(deps): update @openedx/paragon to v22.13.0, fix minor TypeScript warning (#1572)
* fix(deps): update dependency @openedx/paragon to v22.13.0 * fix: update use of useWindowSize() to reflect accurate data types * chore: allow slightly larger bundle size for new paragon :/ --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 5e5fdeb commit 826f138

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"files": [
9797
{
9898
"path": "dist/*.js",
99-
"maxSize": "1300kB"
99+
"maxSize": "1350kB"
100100
}
101101
],
102102
"normalizeFilenames": "^.+?(\\..+?)\\.\\w+$"

src/courseware/course/new-sidebar/SidebarContextProvider.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ const SidebarProvider: React.FC<Props> = ({
2525
}) => {
2626
const { verifiedMode } = useModel('courseHomeMeta', courseId);
2727
const topic = useModel('discussionTopics', unitId);
28-
const shouldDisplayFullScreen = useWindowSize().width < breakpoints.large.minWidth;
29-
const shouldDisplaySidebarOpen = useWindowSize().width > breakpoints.medium.minWidth;
28+
const windowWidth = useWindowSize().width ?? window.innerWidth;
29+
const shouldDisplayFullScreen = windowWidth < breakpoints.large.minWidth;
30+
const shouldDisplaySidebarOpen = windowWidth > breakpoints.medium.minWidth;
3031
const query = new URLSearchParams(window.location.search);
3132
const isInitiallySidebarOpen = shouldDisplaySidebarOpen || query.get('sidebar') === 'true';
3233
const sidebarKey = `sidebar.${courseId}`;

0 commit comments

Comments
 (0)