* 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:
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user