From 0b854ecccfe7832ba9a837605822a103fd9d8bc0 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 21 Jun 2017 00:50:15 +0200 Subject: clearing out old code --- client/components/App.jsx | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 client/components/App.jsx (limited to 'client/components/App.jsx') diff --git a/client/components/App.jsx b/client/components/App.jsx new file mode 100644 index 0000000..e478ea0 --- /dev/null +++ b/client/components/App.jsx @@ -0,0 +1,41 @@ +import { h, Component } from 'preact' +import db from '../db' + +export default class App extends Component { + constructor() { + super() + this.state = { + data: db.backupDB, + } + db.fetch( data => this.setState({ data }) ) + } + render() { + const paintings = this.state.data.painting.map( (painting, i) => { + return ( +
+
+
+
+
+
+
+ {painting.title} +
+ {painting.medium}
+ {painting.date}
+ {painting.image.caption}
+
+
+
+ ) + }) + return ( +
+
Procedural Paintings by Pepper
+
+ {paintings} +
+
+ ) + } +} -- cgit v1.2.3-70-g09d2