Commit c47a242
Changed files (2)
app
components
screens
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>
)
}
}
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);
}
}