From 1f9253253e1914fb09ec0b54201ad934870782d8 Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Thu, 1 Jun 2017 16:40:39 -0400
Subject: very basic print client

---
 lib/awprint/client/index.jsx | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 lib/awprint/client/index.jsx

(limited to 'lib/awprint/client/index.jsx')

diff --git a/lib/awprint/client/index.jsx b/lib/awprint/client/index.jsx
new file mode 100644
index 0000000..136f3ff
--- /dev/null
+++ b/lib/awprint/client/index.jsx
@@ -0,0 +1,13 @@
+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('react-root'))
-- 
cgit v1.2.3-70-g09d2

