mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-31 20:58:03 +00:00
♻️(frontend) enhance useSidePanel
Encapsulate all interactions with the layout store concerning the side panel into a hook. This hook exposes a clear interface. Each variable has a single responsability, with a clear naming.
This commit is contained in:
committed by
aleb_the_flash
parent
0db36c788b
commit
a47f1f92c4
@@ -1,12 +1,12 @@
|
||||
import { proxy } from 'valtio'
|
||||
import { SidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'
|
||||
import { PanelId } from '@/features/rooms/livekit/hooks/useSidePanel'
|
||||
|
||||
type State = {
|
||||
showHeader: boolean
|
||||
sidePanel: SidePanel | null
|
||||
activePanelId: PanelId | null
|
||||
}
|
||||
|
||||
export const layoutStore = proxy<State>({
|
||||
showHeader: false,
|
||||
sidePanel: null,
|
||||
activePanelId: null,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user