File tree Expand file tree Collapse file tree 3 files changed +24
-36
lines changed
Expand file tree Collapse file tree 3 files changed +24
-36
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { HamburgerIcon } from '@chakra-ui/icons';
33import { Box , Flex } from '@chakra-ui/layout' ;
44import { useBreakpointValue } from '@chakra-ui/media-query' ;
55import { Drawer , DrawerContent , DrawerOverlay } from '@chakra-ui/modal' ;
6- import { Fade } from '@chakra-ui/transition' ;
76import React from 'react' ;
87import { useSocket } from '../../core/query' ;
98import { useUiState } from '../../core/store' ;
@@ -21,30 +20,25 @@ const Main = () => {
2120 return (
2221 < >
2322 < Flex w = "100vw" h = "100vh" position = "relative" >
24- < Box position = "absolute" top = { 4 } left = { 3 } >
25- < Fade
26- in = { ! uiState . showRoomList . value }
27- transition = { {
28- enter : { delay : 0.25 } ,
29- } }
30- >
23+ { ! uiState . showRoomList . value && (
24+ < Box position = "absolute" top = { 4 } left = { 3 } >
3125 < IconButton
3226 onClick = { handleToggleRoomList }
3327 borderRadius = "full"
3428 zIndex = { 2 }
3529 >
3630 < HamburgerIcon />
3731 </ IconButton >
38- </ Fade >
39- </ Box >
40-
41- < RoomList
42- flex = "1"
43- maxW = { permanentDrawer && uiState . showRoomList . value ? ' 360px' : '0px' }
44- overflow = "hidden"
45- borderRightWidth = "1px"
46- transition = "max-width 0.25s"
47- />
32+ </ Box >
33+ ) }
34+ { permanentDrawer && uiState . showRoomList . value && (
35+ < RoomList
36+ flex = "1"
37+ maxW = " 360px"
38+ overflow = "hidden"
39+ borderRightWidth = "1px"
40+ />
41+ ) }
4842 < Room flex = "3" />
4943 </ Flex >
5044
Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ const VideoGrid = props => {
1414 const uiState = useUiState ( ) ;
1515
1616 useEffect (
17- ( ) =>
18- setTimeout ( ( ) => {
19- if ( updateLayout ?. current ) updateLayout . current ( ) ;
20- } , 250 ) ,
17+ ( ) => updateLayout . current ( ) ,
2118 [ uiState . currentPanel . value , uiState . showRoomList . value ]
2219 ) ;
2320
Original file line number Diff line number Diff line change @@ -77,20 +77,17 @@ const Room = props => {
7777 ) }
7878 </ VStack >
7979
80- < SidePanel
81- flex = "1"
82- maxW = {
83- permanentDrawer && ! ! uiState . currentPanel . value
84- ? '360px'
85- : '0px'
86- }
87- overflow = "hidden"
88- borderLeftWidth = "1px"
89- transition = "max-width 0.25s"
90- title = { uiState . currentPanel ?. title ?. value }
91- content = { uiState . currentPanel ?. content ?. value }
92- room = { room . data }
93- />
80+ { permanentDrawer && ! ! uiState . currentPanel . value && (
81+ < SidePanel
82+ flex = "1"
83+ maxW = "360px"
84+ overflow = "hidden"
85+ borderLeftWidth = "1px"
86+ title = { uiState . currentPanel ?. title ?. value }
87+ content = { uiState . currentPanel ?. content ?. value }
88+ room = { room . data }
89+ />
90+ ) }
9491
9592 < Drawer
9693 placement = "right"
You can’t perform that action at this time.
0 commit comments