diff --git a/client/js/app.js b/client/js/app.js index c844cc24..395af2eb 100644 --- a/client/js/app.js +++ b/client/js/app.js @@ -1,14 +1,17 @@ const choo = require('choo') const app = choo() -// TODO: client-side choo logger // define models: app.model(require('./models/archive')) // define routes: app.router((route) => [ - route('/:archiveId', require('./components/archive')) + route('/', require('./pages/landing')), + route('/:archiveKey', require('./pages/archive')) ]) -// start app: -app.start('#archive-list') +if (module.parent) { + module.exports = app +} else { + app.start('#app-root') +} diff --git a/client/js/components/archive/index.js b/client/js/components/archive/index.js deleted file mode 100644 index ddd4ea88..00000000 --- a/client/js/components/archive/index.js +++ /dev/null @@ -1,13 +0,0 @@ -const html = require('choo/html') - -const archive = (state, prev, send) => { - return html`
+ Drag and drop files to upload and start sharing your data +
+