Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop/mobile layout: Switch at 900px not 750 #418

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hooks/useScreenDims.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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,
};
Expand Down
Loading