Files
my-links/inertia/hooks/use_disable_overflow.ts
Sonny 5c37fe9c31 refactor: remove all legacy files
+ comment/delete things that haven't yet migrated to mantine
2024-11-10 00:00:20 +01:00

10 lines
211 B
TypeScript

import { useEffect } from 'react';
export const useDisableOverflow = () =>
useEffect(() => {
document.body.style.overflow = 'hidden';
return () => {
document.body.style.overflow = 'auto';
};
}, []);