Skip to content

Commit

Permalink
* fix(deps): update @openedx/paragon to v22.13.0, fix minor TypeScrip…
Browse files Browse the repository at this point in the history
…t 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>
  • Loading branch information
bradenmacdonald and renovate[bot] authored Jan 10, 2025
1 parent 5e5fdeb commit 826f138
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"files": [
{
"path": "dist/*.js",
"maxSize": "1300kB"
"maxSize": "1350kB"
}
],
"normalizeFilenames": "^.+?(\\..+?)\\.\\w+$"
Expand Down
5 changes: 3 additions & 2 deletions src/courseware/course/new-sidebar/SidebarContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ const SidebarProvider: React.FC<Props> = ({
}) => {
const { verifiedMode } = useModel('courseHomeMeta', courseId);
const topic = useModel('discussionTopics', unitId);
const shouldDisplayFullScreen = useWindowSize().width < breakpoints.large.minWidth;
const shouldDisplaySidebarOpen = useWindowSize().width > breakpoints.medium.minWidth;
const windowWidth = useWindowSize().width ?? window.innerWidth;
const shouldDisplayFullScreen = windowWidth < breakpoints.large.minWidth;
const shouldDisplaySidebarOpen = windowWidth > breakpoints.medium.minWidth;
const query = new URLSearchParams(window.location.search);
const isInitiallySidebarOpen = shouldDisplaySidebarOpen || query.get('sidebar') === 'true';
const sidebarKey = `sidebar.${courseId}`;
Expand Down

0 comments on commit 826f138

Please sign in to comment.