From 8df8981b6c8b67eb61d83022f17f6dcdcefc88fc Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 8 Feb 2025 22:21:06 -0600 Subject: [PATCH] Tweak useIsDesktop --- src/utility/useIsDesktop.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/useIsDesktop.ts b/src/utility/useIsDesktop.ts index 2a0e0b2d..729c6639 100644 --- a/src/utility/useIsDesktop.ts +++ b/src/utility/useIsDesktop.ts @@ -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);