diff options
| author | mo khan <mo@mokhan.ca> | 2016-12-24 14:35:09 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2016-12-24 14:35:09 -0700 |
| commit | 8bbf32385078afc5c412c71ca658c238cb63398a (patch) | |
| tree | 655caae8460fccdefbccb2f5381ef02a43931cf1 | |
| parent | 0dd65ab450bc02e2cd43a15cf71b51498959657e (diff) | |
extract method to render each card.
| -rw-r--r-- | app/screens/dashboard-screen.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/screens/dashboard-screen.js b/app/screens/dashboard-screen.js index 2fe599c..7c346b5 100644 --- a/app/screens/dashboard-screen.js +++ b/app/screens/dashboard-screen.js @@ -51,8 +51,9 @@ export default class DashboardScreen extends ApplicationComponent { } renderWorkouts(workouts) { + let renderEach = (workout) => <WorkoutSummary key={workout.id} {...workout} />; return ( - <DeckSwiper dataSource={workouts} renderItem={workout => <WorkoutSummary key={workout.id} {...workout} />} /> + <DeckSwiper dataSource={workouts} renderItem={renderEach} /> ); } |
