fixed route links

This commit is contained in:
Hayden 2021-01-22 09:18:31 -09:00
commit 8b57e6ea47

View file

@ -3,7 +3,8 @@
<v-card
:class="{ 'on-hover': hover }"
:elevation="hover ? 12 : 2"
@click="moreInfo(slug)"
:to="route ? `/recipe/${slug}` : ''"
@click="$emit('click')"
>
<v-img height="200" :src="getImage(image)"></v-img>
<v-card-title class="my-n3 mb-n6">{{ name | truncate(30) }}</v-card-title>
@ -52,11 +53,6 @@ export default {
},
},
methods: {
moreInfo(recipeSlug) {
if (this.route) {
this.$router.push(`/recipe/${recipeSlug}`);
} else this.$emit("click");
},
getImage(image) {
return utils.getImageURL(image);
},