mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-09 10:19:26 +00:00
fixup! ♻️(frontend) replace side panel context with valtio store
This commit is contained in:
@@ -110,6 +110,15 @@ export const useSidePanel = () => {
|
||||
layoutStore.activePanelId = PanelId.TOOLS
|
||||
}
|
||||
|
||||
const closeSidePanel = () => {
|
||||
if (isSubPanelOpen) {
|
||||
layoutStore.activeSubPanelId = null
|
||||
layoutStore.activePanelId = null
|
||||
return
|
||||
}
|
||||
layoutStore.activePanelId = null
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const handleKeyDown = () => {
|
||||
lastInteractionRef.current = 'keyboard'
|
||||
@@ -160,6 +169,7 @@ export const useSidePanel = () => {
|
||||
toggleInfo,
|
||||
openTranscript,
|
||||
openScreenRecording,
|
||||
closeSidePanel,
|
||||
isSubPanelOpen,
|
||||
isChatOpen,
|
||||
isParticipantsOpen,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { useCallback } from 'react'
|
||||
import type { SidePanelTriggerKey } from '../types/sidePanelTypes'
|
||||
import { useSidePanelTriggers } from './useSidePanelTriggers'
|
||||
|
||||
export const useSidePanelTriggerRef = (key: SidePanelTriggerKey) => {
|
||||
const { setTrigger } = useSidePanelTriggers()
|
||||
return useCallback(
|
||||
(el: HTMLElement | null) => {
|
||||
setTrigger(key, el)
|
||||
},
|
||||
[key, setTrigger]
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user