Skip to content

Commit

Permalink
binxhealth#3 - forgot to make homeworld a link.
Browse files Browse the repository at this point in the history
sfrankian committed May 28, 2018
1 parent 0c2314a commit b980b0c
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Person.vue
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<h1>{{results.name}}</h1>
<h4>Biography</h4>
<ul class="list-group pb-3" id="bio">
<li class="list-group-item">Homeworld: {{ results.homeworld }}</li>
<li class="list-group-item">Homeworld: <a :href="results.homeworld.url">{{ results.homeworld.name }}</a></li>
<li class="list-group-item">Birth year: {{ results.birth_year }}</li>
<li class="list-group-item">Height: {{ results.height }}</li>
<li class="list-group-item">Mass: {{ results.mass }}</li>
5 changes: 3 additions & 2 deletions src/store/people.js
Original file line number Diff line number Diff line change
@@ -48,8 +48,9 @@ export default {
return response.json()
}
})
const homeworld = await renderAttributeName(results.homeworld)
results.homeworld = homeworld
const homeworldUrl = results.homeworld
const homeworld = await renderAttributeName(homeworldUrl)
results.homeworld = { 'name': homeworld, 'url': homeworldUrl }

const species = await renderAttributeName(results.species[0])
results.species = species

0 comments on commit b980b0c

Please sign in to comment.