1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-10-03 03:21:56 +02:00
Files
BezierInfo-2/components/SectionHeader.jsx
2016-09-14 15:03:45 -07:00

20 lines
419 B
JavaScript

var React = require("react");
var SectionHeader = React.createClass({
render: function() {
return (
<h2 id={this.props.name} data-num={this.props.number}>
<a href={'#' + this.props.name}>{this.props.title}</a>
</h2>
);
},
componentDidMount() {
var h = window.location.hash;
if (h) {
window.location = window.location.hash;
}
}
});
module.exports = SectionHeader;