Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
14 lines
293 B
Plaintext
14 lines
293 B
Plaintext
// src/index.ts
|
|
import { useIsSSR } from "@react-aria/ssr";
|
|
var MOBILE_SCREEN_WIDTH = 700;
|
|
function useIsMobile() {
|
|
let isSSR = useIsSSR();
|
|
if (isSSR || typeof window === "undefined") {
|
|
return false;
|
|
}
|
|
return window.screen.width <= MOBILE_SCREEN_WIDTH;
|
|
}
|
|
export {
|
|
useIsMobile
|
|
};
|