From 658263c5beac838240a19627894ef0621f681442 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 5 Jun 2017 17:42:51 -0400 Subject: browser, touchable --- client/src/lib/components/touchable.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 client/src/lib/components/touchable.js (limited to 'client/src/lib/components/touchable.js') diff --git a/client/src/lib/components/touchable.js b/client/src/lib/components/touchable.js new file mode 100644 index 0000000..fd72c60 --- /dev/null +++ b/client/src/lib/components/touchable.js @@ -0,0 +1,28 @@ +import React, { Component } from 'react'; +import { + TouchableOpacity, + TouchableWithoutFeedback, +} from 'react-native'; + +const isIphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) +const isIpad = (navigator.userAgent.match(/iPad/i)) +const isAndroid = (navigator.userAgent.match(/Android/i)) +const isMobile = isIphone || isIpad || isAndroid +const isDesktop = ! isMobile +const isFirefox = navigator.userAgent.match('Firefox') + +export default class Touchable extends Component { + render() { + if (isFirefox) { + return ( + + ) + } + else { + return ( + + ) + } + } +} + -- cgit v1.2.3-70-g09d2