Commit 0880e53
Changed files (2)
app
components
screens
app/components/workout.js
@@ -4,9 +4,10 @@ import { View, Text } from 'react-native';
export default class Workout extends Component {
render() {
return (
- <View style={{flex: 1}}>
- <Text>{this.props.routine_name}</Text>
- <Text>{this.props.body_weight.amount}</Text>
+ <View style={{flex: 1, flexDirection: 'row', justifyContent: 'center', padding: 10, backgroundColor: '#f6f6f6'}}>
+ <Text style={{width: 50, height: 25}}>{this.props.routine_name}</Text>
+ <Text style={{width: 100, height: 25}}>{this.props.body_weight.amount} lbs</Text>
+ <Text style={{width: 200, height: 25}}>{this.props.occurred_at}</Text>
</View>
)
}
app/screens/dashboard-screen.js
@@ -16,15 +16,16 @@ export default class DashboardScreen extends ApplicationComponent {
render() {
return (
- <View>
+ <View style={{flex: 1}}>
<Text>Welcome back {this.props.username}!</Text>
<Button onPress={this.loadWorkouts.bind(this)} title="Reload" />
<Button onPress={this.onHistory.bind(this)} title="History" />
- <Button onPress={this.onStartWorkout.bind(this)} title="Start Workout" />
<ListView
dataSource={this.state.dataSource}
renderRow={(row) => <Workout {...row} />}
+ enableEmptySections={true}
/>
+ <Button onPress={this.onStartWorkout.bind(this)} title="Start Workout" />
<Button onPress={this.onLogout.bind(this)} title="Logout" />
</View>
);