summaryrefslogtreecommitdiff
path: root/client/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-04-21 11:41:01 -0400
committerJules Laplace <jules@okfoc.us>2017-04-21 11:41:01 -0400
commit4c8c80162a60231b0254abcce8a336447c3a3416 (patch)
treee270c18a22c5d41ce922d28d968491ef4a42f510 /client/index.js
parentbf9bdaa3e56adcac8abc955cace439d0092033e3 (diff)
some node modules
Diffstat (limited to 'client/index.js')
-rw-r--r--client/index.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/client/index.js b/client/index.js
new file mode 100644
index 0000000..61e61ad
--- /dev/null
+++ b/client/index.js
@@ -0,0 +1,15 @@
+
+import React from 'react'
+import ReactDOM from 'react-dom';
+import App from './components/App.jsx';
+
+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
+
+document.body.classList.add(isDesktop ? 'desktop' : 'mobile')
+
+ReactDOM.render(<App />, document.getElementById('container'));
+