Spaces:
Sleeping
Sleeping
File size: 375 Bytes
f0953a4 |
1 2 3 4 5 6 7 8 9 10 11 |
export const isMobile = () => {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
};
export const isTablet = () => {
const userAgent = navigator.userAgent.toLowerCase();
return /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(
userAgent
);
};
|