import "./Sidebar.css"; import React, { useEffect, useState } from "react"; import { useHistory } from "react-router"; import { SidebarDesktop } from "../SidebarDesktop/SidebarDesktop"; import { SidebarMobile } from "../SidebarMobile/SidebarMobile"; import { closeStream } from "utils/app"; import { useAppSelector } from "hooks/redux"; export const Sidebar: React.FC = ({ exitPopup, isMobile, heightDevice, players }) => { const [isMuted, setMuted] = useState(true); const [isControl, setControl] = useState(false); const history = useHistory() const { playerCount } = useAppSelector((state) => state.sessionReducer); const handleCloseStream = () => { closeStream() history.push('/') } const handleMuteClick = () => { setMuted((prev) => !prev); }; const handleControlClick = () => { setControl((prev) => !prev); }; return ( <> {isMobile ? ( ) : ( )} ); };