Skip to content

Conversation

@buberdds
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Nov 14, 2025

Deployed to Cloudflare Pages

Latest commit: 59a79c2a921dbceefbb98fc37fb2825713e4c67c
Status:✅ Deploy successful!
Preview URL: https://7ca6093d.oasis-explorer.pages.dev
Alias: https://pr-2347.oasis-explorer.pages.dev

@buberdds buberdds mentioned this pull request Nov 14, 2025
@buberdds buberdds force-pushed the mz/mui-useMediaQuery branch from cbea36f to 6fe950d Compare November 14, 2025 10:53
@buberdds buberdds marked this pull request as ready for review November 14, 2025 10:58
Comment on lines 19 to 33
const handleResize = () => {
const isMobile = window.matchMedia(`(max-width: ${BREAKPOINTS.md - 1}px)`).matches
const isTablet = window.matchMedia(`(max-width: ${BREAKPOINTS.lg - 1}px)`).matches
const isLaptop = window.matchMedia(`(max-width: ${BREAKPOINTS.xl - 1}px)`).matches
const isDesktop = window.matchMedia(`(min-width: ${BREAKPOINTS.xl}px)`).matches

setScreenSize({
isMobile,
isTablet,
isLaptop,
isDesktop,
})
}

window.addEventListener('resize', handleResize)
Copy link
Member

Choose a reason for hiding this comment

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

Previous mui implementation used mediaQueryList.addEventListener('change', notify);
https://github.com/mui/material-ui/blob/dba602459c8b50d34ecbf3c6e61a3f805c7cb413/packages/mui-system/src/useMediaQuery/useMediaQuery.ts#L103-L108

to consider if we see any issues

Copy link
Contributor Author

Choose a reason for hiding this comment

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

switched to media query change listener

@buberdds buberdds force-pushed the mz/mui-useMediaQuery branch 2 times, most recently from c8f8f06 to 23cd93e Compare November 17, 2025 10:03
@buberdds buberdds force-pushed the mz/mui-useMediaQuery branch from 23cd93e to 59a79c2 Compare November 17, 2025 10:10
@buberdds buberdds merged commit 6ffe6ab into master Nov 17, 2025
10 checks passed
@buberdds buberdds deleted the mz/mui-useMediaQuery branch November 17, 2025 10:14
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.

3 participants