UNPKG

@rainbow-me/rainbowkit

Version:
25 lines (22 loc) 599 B
"use client"; // src/utils/isMobile.ts function isAndroid() { return typeof navigator !== "undefined" && /android/i.test(navigator.userAgent); } function isSmallIOS() { return typeof navigator !== "undefined" && /iPhone|iPod/.test(navigator.userAgent); } function isLargeIOS() { return typeof navigator !== "undefined" && (/iPad/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1); } function isIOS() { return isSmallIOS() || isLargeIOS(); } function isMobile() { return isAndroid() || isIOS(); } export { isAndroid, isIOS, isMobile };