Skip to content

Commit

Permalink
make title a functional component, relates #154
Browse files Browse the repository at this point in the history
  • Loading branch information
Brymon committed Oct 19, 2018
1 parent b06d26a commit 68f74d5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/Cases/Title.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import React from "react";
import PropTypes from "prop-types";

export default class CasesPageTitle extends React.Component {
render() {
return <h1 id="title">{this.props.stationName}</h1>;
}
}
const CasesPageTitle = props => <h1 id="title">{props.stationName}</h1>;

export default CasesPageTitle;

CasesPageTitle.propTypes = {
stationName: PropTypes.string
Expand Down

0 comments on commit 68f74d5

Please sign in to comment.