diff options
| author | mo khan <mo@mokhan.ca> | 2016-12-25 12:00:41 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2016-12-25 12:00:41 -0700 |
| commit | 330e7eb17ac06fc30526e589bf83bc0ed303943b (patch) | |
| tree | 1c908f035444ab04198282f7bf3a72f249239172 | |
| parent | 85b522c0d6a3dcdcf9e8ae9de52056f62cadfbcc (diff) | |
display routine and body weight.
| -rw-r--r-- | app/screens/new-workout-screen.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/screens/new-workout-screen.js b/app/screens/new-workout-screen.js index 0958603..bc6c4a1 100644 --- a/app/screens/new-workout-screen.js +++ b/app/screens/new-workout-screen.js @@ -7,7 +7,7 @@ export default class NewWorkoutScreen extends Screen { constructor(props) { super(props); this.state = { - isLoading: false, + isLoading: true, eventsOfInterest: [ events.FETCHED_NEW_WORKOUT ] }; } @@ -18,19 +18,19 @@ export default class NewWorkoutScreen extends Screen { } render() { + console.log(this.state.body_weight); + console.log(this.state.routine); + console.log(this.state.exercises); if (this.state.isLoading) { - console.log("loading..."); - return ( - <Container> - <Spinner /> - </Container> - ); + return ( <Container> <Spinner /> </Container>); } else { - console.log("loading new workout..."); return ( <Container> + <Header> + <Title>Routine {this.state.routine.name}</Title> + </Header> <Content> - <Text>Hello!</Text> + <Text>Body Weight: {this.state.body_weight.amount} {this.state.body_weight.unit}</Text> </Content> </Container> ); @@ -44,7 +44,7 @@ export default class NewWorkoutScreen extends Screen { notify(event) { switch(event.event) { - case events.FETCH_NEW_WORKOUT: + case events.FETCHED_NEW_WORKOUT: this.setState({ isLoading: false, ...event }); } } |
