summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-09-28 19:26:51 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-09-28 19:26:51 (GMT)
commitea3ef4df505273827bf2c1e4eef5e9716e9746b0 (patch)
treeafd65e511c94d6b1df9602cdc4cf34d69c6f49f5 /src
parent8ca2b1d7e9c6f142c2d89f33b41a164a0eadf702 (diff)
restructering components
Diffstat (limited to 'src')
-rw-r--r--src/clockView.js14
-rw-r--r--src/component-clock.js33
2 files changed, 33 insertions, 14 deletions
diff --git a/src/clockView.js b/src/clockView.js
deleted file mode 100644
index 61a13f4..0000000
--- a/src/clockView.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var ClockView = React.createClass({
- render: function() {
- return (
- <p>
- Hello, <input type="text" placeholder="Your name here" />!
- It is {this.props.date.toTimeString()}
- </p>
- );
- }
-});
-
-setInterval(function() {
- ReactDOM.render(<ClockView date={new Date()} />, document.getElementById('clock'));
-}, 500);
diff --git a/src/component-clock.js b/src/component-clock.js
new file mode 100644
index 0000000..fb877f4
--- /dev/null
+++ b/src/component-clock.js
@@ -0,0 +1,33 @@
+/*
+ * rhrdweb
+ *
+ * Copyright (C) 2016 Christian Pointner <equinox@helsinki.at>
+ *
+ * This file is part of rhrdweb.
+ *
+ * rhrdweb is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * rhrdweb is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with rhrdweb. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+var ClockView = React.createClass({
+ render: function() {
+ return (
+ <p>
+ Hello, <input type="text" placeholder="Your name here" />!
+ It is {this.props.date.toTimeString()}
+ </p>
+ );
+ }
+});
+
+// ReactDOM.render(<ClockView date={new Date()} />, document.getElementById('clock'));