diff options
| author | mo khan <mo@mokhan.ca> | 2016-12-04 14:46:22 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2016-12-04 14:46:22 -0700 |
| commit | c47a2425e2ca1a1f66bb7f67eafe3b65d7337bf3 (patch) | |
| tree | b082ab2db07c45659cf217a242fbef9b53c5b440 /app | |
| parent | 972d5c17c3157107250c302e84de6508d983fa6d (diff) | |
render routine and body weight.
Diffstat (limited to 'app')
| -rw-r--r-- | app/components/workout.js | 5 | ||||
| -rw-r--r-- | app/screens/dashboard-screen.js | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/app/components/workout.js b/app/components/workout.js index 7a41759..67a2226 100644 --- a/app/components/workout.js +++ b/app/components/workout.js @@ -4,7 +4,10 @@ import { View, Text } from 'react-native'; export default class Workout extends Component { render() { return ( - <Text style={{flex: 1}}>{this.props.name}</Text> + <View style={{flex: 1}}> + <Text>{this.props.routine_name}</Text> + <Text>{this.props.body_weight.amount}</Text> + </View> ) } } diff --git a/app/screens/dashboard-screen.js b/app/screens/dashboard-screen.js index 4a17f7b..b659144 100644 --- a/app/screens/dashboard-screen.js +++ b/app/screens/dashboard-screen.js @@ -23,7 +23,7 @@ export default class DashboardScreen extends ApplicationComponent { <Button onPress={this.onStartWorkout.bind(this)} title="Start Workout" /> <ListView dataSource={this.state.dataSource} - renderRow={(row) => <Workout name={row} />} + renderRow={(row) => <Workout {...row} />} /> <Button onPress={this.onLogout.bind(this)} title="Logout" /> </View> @@ -57,6 +57,6 @@ export default class DashboardScreen extends ApplicationComponent { } mapAll(workouts) { - return this.ds.cloneWithRows(workouts.map((item) => item.routine_name)); + return this.ds.cloneWithRows(workouts); } } |
