π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[web] Add a hook for detecting mobile sized screens
Manav Rathi471a6eff0d99
diff --git a/web/packages/base/hooks.ts b/web/packages/base/hooks.tsnew file mode 100644index 0000000000..1fd954377c--- /dev/null+++ b/web/packages/base/hooks.ts@@ -0,0 +1,10 @@+import { useMediaQuery, useTheme } from "@mui/material";++/**+ * Return true if the screen width is classified as a "mobile" size.+ *+ * We use the MUI "sm" (small, 600px) breakpoint as the cutoff. This hook will+ * return true if the size of the window's width is less than 600px.+ */+export const useIsMobileWidth = () =>+ useMediaQuery(useTheme().breakpoints.down("sm"));