1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 02:42:48 +00:00

working on api for getting unique list of dates

This commit is contained in:
2016-09-09 20:57:34 +00:00
parent 9c0aabe9aa
commit 0539eb740f
6 changed files with 76 additions and 52 deletions

View File

@@ -20,8 +20,8 @@ export default class SensorList extends React.Component {
this.openLink = this.openLink.bind(this);
}
openLink(){
browserHistory.push("/");
openLink(location){
browserHistory.push(`/sensor/${location}`);
this.props.toggleOff();
}
@@ -29,7 +29,7 @@ export default class SensorList extends React.Component {
const date = new Date(sensor.updated);
return (
<div key={index} class="row" onClick={this.openLink}>
<div key={index} class="row" onClick={() => {this.openLink(sensor.location)}}>
<div class="item">
<h1>{sensor.temperature}°f</h1>
</div>