From ff456c1d38f5b4a3a5fa763d965e1470c6d68444 Mon Sep 17 00:00:00 2001 From: Scott Feeney Date: Tue, 14 Jan 2025 19:13:06 -0800 Subject: [PATCH] Desktop/mobile layout: Switch at 900px not 750 This produces more reasonable results in my opinion... the sidebar is 400px wide, so the screen should have to be a bit more than twice that. --- src/hooks/useScreenDims.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useScreenDims.ts b/src/hooks/useScreenDims.ts index 34a4a93..52afe80 100644 --- a/src/hooks/useScreenDims.ts +++ b/src/hooks/useScreenDims.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; -const MAX_MOBILE_WIDTH_PX = 750; +const DESKTOP_MIN_WIDTH_PX = 900; export default function useScreenDims() { const [width, setWidth] = useState(window.innerWidth); @@ -19,7 +19,7 @@ export default function useScreenDims() { }); return { - isMobile: width < MAX_MOBILE_WIDTH_PX, + isMobile: width < DESKTOP_MIN_WIDTH_PX, innerWidth: width, innerHeight: height, };