Initial Mobile UI
All checks were successful
Automated Container Build / build-and-push (push) Successful in 40s

This commit is contained in:
Elijah 2026-05-24 08:48:22 -07:00
parent 322685e3a3
commit 95a2b3ad0e
2 changed files with 171 additions and 62 deletions

View file

@ -0,0 +1,24 @@
import { useState, useEffect } from 'react';
const MOBILE_BREAKPOINT = 768;
export function useIsMobile() {
const [isMobile, setIsMobile] = useState<boolean>(false);
useEffect(() => {
// Initial check
const checkIsMobile = () => {
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
};
checkIsMobile();
// Add resize listener
window.addEventListener('resize', checkIsMobile);
// Cleanup
return () => window.removeEventListener('resize', checkIsMobile);
}, []);
return isMobile;
}