mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
19 lines
586 B
JavaScript
19 lines
586 B
JavaScript
import { Platform } from 'react-native';
|
|
import { getSystemName, isTablet, getDeviceType } from 'react-native-device-info';
|
|
|
|
const isMacCatalina = getSystemName() === 'Mac OS X';
|
|
const isDesktop = getDeviceType() === 'Desktop';
|
|
const getIsTorCapable = () => {
|
|
let capable = true;
|
|
if (Platform.OS === 'android' && Platform.Version < 26) {
|
|
capable = false;
|
|
} else if (isDesktop) {
|
|
capable = false;
|
|
}
|
|
return capable;
|
|
};
|
|
|
|
export const isHandset = getDeviceType() === 'Handset';
|
|
export const isTorCapable = getIsTorCapable();
|
|
export { isMacCatalina, isDesktop, isTablet };
|