mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
d5b3c10cb5
GitOrigin-RevId: af799f1a5b4945ad2acbb460806d559fae7416b9
13 lines
592 B
TypeScript
13 lines
592 B
TypeScript
import { useLayoutContext } from '@/shared/context/layout-context'
|
|
import useFixedSizeColumn from '@/features/ide-react/hooks/use-fixed-size-column'
|
|
import useCollapsiblePanel from '@/features/ide-react/hooks/use-collapsible-panel'
|
|
import { useState } from 'react'
|
|
|
|
export const useChatPane = () => {
|
|
const { chatIsOpen: isOpen } = useLayoutContext()
|
|
const [resizing, setResizing] = useState(false)
|
|
const { fixedPanelRef, handleLayout } = useFixedSizeColumn(isOpen)
|
|
useCollapsiblePanel(isOpen, fixedPanelRef)
|
|
|
|
return { isOpen, fixedPanelRef, handleLayout, resizing, setResizing }
|
|
}
|