Skip to content

Commit

Permalink
refactor: remove unnecessary template tag (gothinkster#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenting authored and igeligel committed Nov 19, 2019
1 parent feb0b7d commit 0b3435f
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions src/components/ArticleMeta.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,23 @@
</router-link>
<span class="date">{{ article.createdAt | date }}</span>
</div>
<template v-if="actions">
<rwv-article-actions
:article="article"
:canModify="isCurrentUser()"
></rwv-article-actions>
</template>
<template v-else>
<button
class="btn btn-sm pull-xs-right"
v-if="!actions"
@click="toggleFavorite"
:class="{
'btn-primary': article.favorited,
'btn-outline-primary': !article.favorited
}"
>
<i class="ion-heart"></i>
<span class="counter"> {{ article.favoritesCount }} </span>
</button>
</template>
<rwv-article-actions
v-if="actions"
:article="article"
:canModify="isCurrentUser()"
></rwv-article-actions>
<button
v-else
class="btn btn-sm pull-xs-right"
@click="toggleFavorite"
:class="{
'btn-primary': article.favorited,
'btn-outline-primary': !article.favorited
}"
>
<i class="ion-heart"></i>
<span class="counter"> {{ article.favoritesCount }} </span>
</button>
</div>
</template>

Expand Down

0 comments on commit 0b3435f

Please sign in to comment.