The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/views/root/MainLayout/useViewportScrolling.ts

13 lines
366 B

import { useEffect } from 'react';
export const useViewportScrolling = (): void => {
useEffect(() => {
document.documentElement.classList.remove('scroll');
document.documentElement.classList.add('noscroll');
return (): void => {
document.documentElement.classList.add('scroll');
document.documentElement.classList.remove('noscroll');
};
}, []);
};