mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 19:43:59 +01:00
hide sidemenu for mobile
This commit is contained in:
parent
d4e72532a8
commit
0302c5301d
|
@ -14,6 +14,7 @@ const Menu = () => {
|
||||||
const setHideSideMenu = useStore((state) => state.setHideSideMenu);
|
const setHideSideMenu = useStore((state) => state.setHideSideMenu);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (window.innerWidth < 768) setHideSideMenu(true);
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
if (window.innerWidth < 768) setHideSideMenu(true);
|
if (window.innerWidth < 768) setHideSideMenu(true);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue