* 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>
This commit is contained in:
Braden MacDonald
2025-01-10 10:09:17 -08:00
committed by GitHub
parent 5e5fdeba44
commit 826f1382dd
3 changed files with 7 additions and 6 deletions

View File

@@ -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}`;