Skip to content

Commit

Permalink
Fix Onboarding breaking due to Sidebar changes made in #2425 (#2437)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeavenVolkoff committed May 2, 2024
1 parent b29deff commit a393350
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions interface/app/$libraryId/Layout/Sidebar/DebugPopover.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CheckSquare } from '@phosphor-icons/react';
import { useQueryClient } from '@tanstack/react-query';
import { SetStateAction } from 'react';
import { SetStateAction, useContext } from 'react';
import { useNavigate } from 'react-router';
import {
auth,
Expand Down Expand Up @@ -31,7 +31,7 @@ import {
useExplorerOperatingSystem
} from '../../Explorer/useExplorerOperatingSystem';
import Setting from '../../settings/Setting';
import { useSidebarContext } from './SidebarLayout/Context';
import { SidebarContext, useSidebarContext } from './SidebarLayout/Context';

export default () => {
const buildInfo = useBridgeQuery(['buildInfo']);
Expand All @@ -41,14 +41,14 @@ export default () => {
const platform = usePlatform();
const navigate = useNavigate();

const sidebar = useSidebarContext();
const sidebar = useContext(SidebarContext);

const popover = usePopover();

function handleOpenChange(action: SetStateAction<boolean>) {
const open = typeof action === 'boolean' ? action : !popover.open;
popover.setOpen(open);
sidebar.onLockedChange(open);
sidebar?.onLockedChange(open);
}

return (
Expand Down

0 comments on commit a393350

Please sign in to comment.