Skip to content

Commit

Permalink
fix(product detail): hide link to OFF if not found. ref #55
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Dec 24, 2023
1 parent cfdb310 commit 240e21a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/ProductDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
</v-col>
</v-row>

<v-row class="mt-0" v-if="product && product.code">
<v-row class="mt-0" v-if="product">
<v-col cols="12" sm="6">
<v-btn v-if="product" size="small" append-icon="mdi-open-in-new" :href="getProductOFFUrl(product)" target="_blank">
<v-btn v-if="product.code && product.source" size="small" append-icon="mdi-open-in-new" :href="getProductOFFUrl(product)" target="_blank">
Open Food Facts
</v-btn>
<p v-if="!product.code || !product.source" class="text-red">
<i>Product not found in Open Food Facts... Don't hesitate to add it :)</i>
</p>
</v-col>
</v-row>

Expand Down

0 comments on commit 240e21a

Please sign in to comment.