summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-04-21 12:30:57 -0400
committerJules Laplace <jules@okfoc.us>2017-04-21 12:30:57 -0400
commit5028ad81845308f3b1954dcc1fde664077fa0fa9 (patch)
tree2e999beb6df2b3d8c4ccf70aa5a460c2374adb4b /client
parent4c8c80162a60231b0254abcce8a336447c3a3416 (diff)
scaffolding
Diffstat (limited to 'client')
-rw-r--r--client/client.js16
-rw-r--r--client/components/App.jsx12
-rw-r--r--client/index.jsx (renamed from client/index.js)2
3 files changed, 29 insertions, 1 deletions
diff --git a/client/client.js b/client/client.js
new file mode 100644
index 0000000..7bc5c51
--- /dev/null
+++ b/client/client.js
@@ -0,0 +1,16 @@
+
+import request from 'superagent'
+
+function fetch (api) {
+ return new Promise(function (resolve, reject){
+ request
+ .api(api)
+ .set('Accept', 'application/json')
+ .end(function(err, res){
+ console.log(res)
+ resolve(res)
+ })
+ })
+}
+
+export default { fetch }
diff --git a/client/components/App.jsx b/client/components/App.jsx
index e69de29..26af681 100644
--- a/client/components/App.jsx
+++ b/client/components/App.jsx
@@ -0,0 +1,12 @@
+import React from 'react'
+
+export default class App extends React.Component {
+ constructor() {
+ super()
+ }
+ render() {
+ return (
+ <div>Loading...</div>
+ )
+ }
+} \ No newline at end of file
diff --git a/client/index.js b/client/index.jsx
index 61e61ad..f64a984 100644
--- a/client/index.js
+++ b/client/index.jsx
@@ -9,7 +9,7 @@ const isAndroid = (navigator.userAgent.match(/Android/i))
const isMobile = isIphone || isIpad || isAndroid
const isDesktop = ! isMobile
-document.body.classList.add(isDesktop ? 'desktop' : 'mobile')
+document.body.classList.add(isDesktop ? 'desktop' : 'mobile');
ReactDOM.render(<App />, document.getElementById('container'));