summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/client/dashboard/gallery.component.js2
-rw-r--r--app/client/index.jsx6
-rw-r--r--app/server/index.js7
3 files changed, 11 insertions, 4 deletions
diff --git a/app/client/dashboard/gallery.component.js b/app/client/dashboard/gallery.component.js
index 0e1f44d..0b13cfe 100644
--- a/app/client/dashboard/gallery.component.js
+++ b/app/client/dashboard/gallery.component.js
@@ -8,7 +8,6 @@ class Gallery extends Component {
}
render(){
const { title, images } = this.props
- images.push(images[0])
const imageList = images.map(image => {
return (
<div>
@@ -16,6 +15,7 @@ class Gallery extends Component {
</div>
)
})
+ imageList.push(imageList[0])
return (
<div class='gallery'>
{imageList}
diff --git a/app/client/index.jsx b/app/client/index.jsx
index a084306..45a1b94 100644
--- a/app/client/index.jsx
+++ b/app/client/index.jsx
@@ -14,9 +14,9 @@ const app = (
<Provider store={store}>
<BrowserRouter>
<div>
- <Route path='/' component={Dashboard} />
- <Route path='/live/' component={LivePix2Pix} />
- <Route path='/dashboard/' component={Dashboard} />
+ <Route exact path='/' component={Dashboard} />
+ <Route exact path='/live/' component={LivePix2Pix} />
+ <Route exact path='/dashboard/' component={Dashboard} />
<Header />
</div>
</BrowserRouter>
diff --git a/app/server/index.js b/app/server/index.js
index 2adfbdc..3104a98 100644
--- a/app/server/index.js
+++ b/app/server/index.js
@@ -3,9 +3,16 @@ const express = require('express')
const app = express()
const http = require('http')
const socket_io = require('socket.io')
+const path = require('path')
app.use(express.static('public', { extensions: ['html'] }))
+function serve_index(req, res) { res.sendFile(path.join(__dirname, '../../public', 'index.html')) }
+app.get('/dashboard/', serve_index)
+app.get('/checkpoint/', serve_index)
+app.get('/dataset/', serve_index)
+app.get('/live/', serve_index)
+app.get('/', serve_index)
// app.get('/images', site.images)
// app.post('/print', bodyParser.urlencoded({ extended: false }), site.print)
// app.use('/upload', require('./upload'))