Tweak useIsDesktop

This commit is contained in:
Sam Becker 2025-02-08 22:21:06 -06:00
parent cdc59fab9d
commit 8df8981b6c

View File

@ -5,7 +5,7 @@ export default function useIsDesktop() {
useEffect(() => {
if (typeof window !== 'undefined') {
const breakpointMd = getComputedStyle(document.documentElement)
const breakpointMd = getComputedStyle(document.body)
.getPropertyValue('--breakpoint-md');
const mql = window.matchMedia(`(min-width: ${breakpointMd})`);
setIsDesktop(mql.matches);