Skip to content

fix: different drawers for different devices#824

Open
cnk2024 wants to merge 4 commits into
stagingfrom
tweaks/mobile-drawer
Open

fix: different drawers for different devices#824
cnk2024 wants to merge 4 commits into
stagingfrom
tweaks/mobile-drawer

Conversation

@cnk2024
Copy link
Copy Markdown
Contributor

@cnk2024 cnk2024 commented Apr 18, 2026

  • mobile: bottom sheet or side panel
  • desktop: full width or side panel

cnk2024 added 2 commits April 18, 2026 17:08
- mobile: bottom sheet or side panel
- desktop: full width or side panel
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmueats Ready Ready Preview Apr 18, 2026 10:27pm

Request Review

@Arom1a
Copy link
Copy Markdown
Contributor

Arom1a commented Apr 19, 2026

Bro why the format check keeps failing 😭

@Arom1a
Copy link
Copy Markdown
Contributor

Arom1a commented Apr 19, 2026

It runs with no error locally

Copy link
Copy Markdown
Contributor

@Arom1a Arom1a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything else LGTM!

@@ -3,19 +3,20 @@
const isMobileContext = createContext<boolean | undefined>(undefined);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, I think this should be PascalCase


export const useIsMobileContext = () => {
const context = useContext(isMobileContext);
if (context === undefined) throw new Error('Cannot use drawer tabs context outside of provider!');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also didn't catch this on previous reviews oops

window.addEventListener('resize', handleResize);
return () => window.removeEventListener('resize', handleResize);
}, []);
}, [isTouchScreen]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you leave this here for development purpose? I think in real use cases this don't need to be recalculated every render

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants