Try without timer.
This commit is contained in:
parent
40c5dc2cb0
commit
76eb9012fa
@ -29,7 +29,5 @@ Meteor.startup(() => {
|
||||
Meteor.subscribe('activeDeviceCollection');
|
||||
}
|
||||
|
||||
Meteor.setTimeout(function() {
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
}, 1250);
|
||||
});
|
||||
@ -19,18 +19,23 @@ export default function Home() {
|
||||
});
|
||||
|
||||
const sensorData = useTracker(() => {
|
||||
return SensorDataCollection.find({ device_id: deviceName.deviceName }, { sort: { timestamp: -1 }, limit: 61 }).fetch().reverse();
|
||||
return SensorDataCollection.find({device_id: deviceName.deviceName}, {
|
||||
sort: {timestamp: -1},
|
||||
limit: 61
|
||||
}).fetch().reverse();
|
||||
});
|
||||
|
||||
const handleChange = (e) => {
|
||||
if (e.target.value === "") {console.log("No device selected!");} else {
|
||||
if (e.target.value === "") {
|
||||
console.log("No device selected!");
|
||||
} else {
|
||||
var doc = ActiveDeviceCollection.findOne({deviceName: deviceName.deviceName});
|
||||
ActiveDeviceCollection.update({_id: doc._id}, {$set: {deviceName: e.target.value}});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*if (sensorData.length <= 0) {
|
||||
if ((sensorData.length <= 0) || (deviceName.length <= 0) || (uniqueEspNames.length <= 0)) {
|
||||
return (
|
||||
<CardDeck>
|
||||
<Card>
|
||||
@ -41,7 +46,7 @@ export default function Home() {
|
||||
</Card>
|
||||
</CardDeck>
|
||||
)
|
||||
} else {}*/
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Row>
|
||||
@ -123,3 +128,4 @@ export default function Home() {
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user