refactor: add hook use-is-mobile for use-window-width calls

This commit is contained in:
Tom (plebeius.eth)
2024-05-29 16:17:37 +02:00
parent c491b07295
commit 0701f82174
6 changed files with 20 additions and 12 deletions
+8
View File
@@ -0,0 +1,8 @@
import useWindowWidth from './use-window-width';
const useIsMobile = () => {
const windowWidth = useWindowWidth();
return windowWidth < 640;
};
export default useIsMobile;