ref(responsive-ui): rename clientWidth to videoSpaceWidth.

Currently the clientWidth is not representing the window width but it is representing the available video space width since we are subtracting the width of the participants pane and chat area.
This commit is contained in:
Hristo Terezov
2025-05-05 17:48:40 -05:00
parent 598d3764dd
commit 1556f1b81a
21 changed files with 73 additions and 69 deletions

View File

@@ -173,16 +173,16 @@ const DialogWithTabs = ({
const [ selectedTab, setSelectedTab ] = useState<string | undefined>(defaultTab ?? tabs[0].name);
const [ userSelected, setUserSelected ] = useState(false);
const [ tabStates, setTabStates ] = useState(tabs.map(tab => tab.props));
const clientWidth = useSelector((state: IReduxState) => state['features/base/responsive-ui'].clientWidth);
const videoSpaceWidth = useSelector((state: IReduxState) => state['features/base/responsive-ui'].videoSpaceWidth);
const [ isMobile, setIsMobile ] = useState(false);
useEffect(() => {
if (clientWidth <= MOBILE_BREAKPOINT) {
if (videoSpaceWidth <= MOBILE_BREAKPOINT) {
!isMobile && setIsMobile(true);
} else {
isMobile && setIsMobile(false);
}
}, [ clientWidth, isMobile ]);
}, [ videoSpaceWidth, isMobile ]);
useEffect(() => {
if (isMobile) {