diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/clockView.js | 14 | ||||
-rw-r--r-- | src/component-clock.js | 33 |
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')); |