import { UAParser } from "ua-parser-js"; const parser = new UAParser(); const features = parser.getDevice(); export function isMobile() { return Boolean(features.type && ["wearable", "mobile", "tablet"].includes(features.type)); } export function isPWA() { return Boolean(isMobile() && window.matchMedia("(display-mode: standalone)").matches); }