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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user