1
0
mirror of synced 2024-12-16 08:11:14 +01:00
bemaniutils/bemani/frontend/static/controllers/home.react.js
2019-12-08 21:43:49 +00:00

31 lines
790 B
JavaScript

/*** @jsx React.DOM */
var home = React.createClass({
getInitialState: function(props) {
return {
news: window.news,
};
},
render: function() {
return (
<div>{
this.state.news.map(function(entry) {
return (
<div className="section">
<h3>{ entry.title }</h3>
<Timestamp timestamp={entry.timestamp} />
<div dangerouslySetInnerHTML={ {__html: entry.body} }></div>
</div>
);
}.bind(this))
}</div>
);
},
});
ReactDOM.render(
React.createElement(home, null),
document.getElementById('content')
);