Skip to content

Commit

Permalink
Merge pull request #27 from team-alarm-clock/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
carmenvramos authored Dec 21, 2018
2 parents 1ceca5b + 44c3ccb commit 945fd94
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
15 changes: 15 additions & 0 deletions src/components/albums/AlbumDetail.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div>
<h1>I am the Album Detail for Favorites</h1>
</div>
</template>

<script>
export default {
};
</script>

<style>
</style>
2 changes: 2 additions & 0 deletions src/components/albums/AlbumList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ export default {
api.saveRelease(release)
.then(releases => {
this.releases = releases.results;
this.$router.push('/profile');
}).catch(err => {
console.log(err);
});
},
}
Expand Down
11 changes: 7 additions & 4 deletions src/components/profiles/Profile.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div class="badges-container">
<h2>My Badges</h2>
<div class="badges">
<!-- <v-container>
<v-layout align-center justify-space-around>
Expand All @@ -14,7 +13,8 @@
</div>

<section>
<h2>My favorite artists</h2>
<Loading :loading="loading"/>
<h2>MY FAVORITE ALBUM & ARTISTS</h2>
<ul>
<FavoriteArtists v-for="favorite in favorites"
:key="favorite.album"
Expand All @@ -23,27 +23,30 @@
/>
</ul>
</section>

<RouterLink to="/search">Back to Search</RouterLink>
</div>
</template>

<script>
import api from '../../services/api.js';
import FavoriteArtists from './FavoriteArtists';
import Loading from '../shared/Loading';
export default {
data() {
return {
loading: true,
favorites: []
};
},
components: {
FavoriteArtists
FavoriteArtists,
Loading
},
created() {
api.getFavorites()
.then(favorites => {
this.favorites = favorites;
this.loading = false;
})
.catch(err => {
this.error = err;
Expand Down

0 comments on commit 945fd94

Please sign in to comment.