mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-26 17:52:59 +02:00
Update SidebarContext.tsx
This commit is contained in:
parent
c6cf5bccf0
commit
6625479765
@ -7,7 +7,7 @@ export function SidebarProvider({ children }: SidebarProviderProps) {
|
||||
// All sidebar state management
|
||||
const quickAccessRef = useRef<HTMLDivElement>(null);
|
||||
const toolPanelRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
|
||||
const [sidebarsVisible, setSidebarsVisible] = useState(true);
|
||||
const [leftPanelView, setLeftPanelView] = useState<'toolPicker' | 'toolContent'>('toolPicker');
|
||||
const [readerMode, setReaderMode] = useState(false);
|
||||
@ -44,4 +44,8 @@ export function useSidebarContext(): SidebarContextValue {
|
||||
throw new Error('useSidebarContext must be used within a SidebarProvider');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
}
|
||||
|
||||
export function useOptionalSidebarContext(): SidebarContextValue | undefined {
|
||||
return useContext(SidebarContext);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user