2020-01-29 14:30:17 +02:00
|
|
|
import Platform from '../react/Platform';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns whether or not the current environment is a mobile device.
|
|
|
|
|
*
|
|
|
|
|
* @returns {boolean}
|
|
|
|
|
*/
|
|
|
|
|
export function isMobileBrowser() {
|
|
|
|
|
return Platform.OS === 'android' || Platform.OS === 'ios';
|
|
|
|
|
}
|
2020-02-25 14:41:13 +02:00
|
|
|
|
2021-02-23 09:39:20 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns whether or not the current environment is an ios mobile device.
|
|
|
|
|
*
|
|
|
|
|
* @returns {boolean}
|
|
|
|
|
*/
|
|
|
|
|
export function isIosMobileBrowser() {
|
|
|
|
|
return Platform.OS === 'ios';
|
|
|
|
|
}
|
2023-09-04 16:27:04 +03:00
|
|
|
|
2024-06-21 17:14:54 +03:00
|
|
|
/**
|
|
|
|
|
* Returns whether or not the current environment is an ipad device.
|
|
|
|
|
*
|
|
|
|
|
* @returns {boolean}
|
|
|
|
|
*/
|
|
|
|
|
export function isIpadMobileBrowser() {
|
|
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
return isIosMobileBrowser() && Platform.isPad;
|
|
|
|
|
}
|
|
|
|
|
|