40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import React, { Component } from 'react';
|
|
import { Text } from 'react-native';
|
|
import styles from './../style';
|
|
import { YellowBox } from 'react-native';
|
|
YellowBox.ignoreWarnings(['Warning: Each child in an array or iterator should have a unique "key" prop.']); //Silence Warning
|
|
|
|
export default class NodeInformation extends Component {
|
|
|
|
constructor(props) {
|
|
super(props);
|
|
};
|
|
|
|
render() {
|
|
var dataATT = this.props.dataATT;
|
|
var ready = false;
|
|
// console.log('Child-Component Lat' , dataATT[0]);
|
|
var hn = 'praxis-dr-tschoep';
|
|
for (var k in dataATT) {
|
|
if (dataATT.hasOwnProperty(k)) {
|
|
if (dataATT[k].nodeinfo.hostname === hn) {
|
|
ready = true;
|
|
}
|
|
}
|
|
};
|
|
|
|
textAnzeigen = () => {
|
|
if(ready === false) {
|
|
return 'Loading..';
|
|
}
|
|
else {
|
|
return 'Ready';
|
|
}
|
|
}
|
|
|
|
return ([
|
|
<Text style={{ paddingBottom: 10 }}>{textAnzeigen()}</Text>
|
|
]);
|
|
}
|
|
}
|