/**
* Created by greg on 2016-06-27.
*/
import React, { Component } from 'react';
import {
Navigator,
TouchableOpacity,
Text,
View
} from 'react-native';
import styles from '../../styles/styles';
import BodyStore from '../../stores/body';
class LeanBodyMass extends Component {
constructor(props) {
super(props);
this.state = this._getStateObject();
}
componentDidMount() {
this.unsub = BodyStore.listen(this._onBodyStoreEvent.bind(this));
}
componentWillUnmount() {
this.unsub();
}
_onBodyStoreEvent(evt) {
this.setState(this._getStateObject())
}
_getStateObject() {
return {
leanBodyMassFormatted: BodyStore.GetLeanBodyMassFormatted(),
};
}
render() {
return (
}/>
);
}
renderScene(route, navigator) {
return (
{this.state.leanBodyMassFormatted}
);
}
}
var NavigationBarRouteMapper = {
LeftButton(route, navigator, index, nextState) {
return (
{navigator.parentNavigator.pop()}}>
Back
);
},
RightButton(route, navigator, index, nextState) {
return null;
},
Title(route, navigator, index, nextState) {
return (
Lean Body Mass
);
}
};
module.exports = LeanBodyMass;
export default LeanBodyMass;