Refactor code based on comments from PR review

This commit is contained in:
aonomike 2019-05-09 02:27:03 +03:00
parent 399507c7fb
commit bf57198815
3 changed files with 4 additions and 15 deletions

View File

@ -12,7 +12,7 @@
>
<hc-image
:title="badge.key"
:image-props="imageProps(badge.icon)"
:image-props="{ src: badge.icon}"
class="hc-badge"
/>
</div>
@ -30,11 +30,6 @@ export default {
type: Array,
default: () => []
}
},
methods: {
imageProps(icon) {
return { src: icon }
}
}
}
</script>

View File

@ -58,11 +58,8 @@ export default {
}
},
computed: {
iconPath() {
return `/img/empty/${this.icon}.svg`
},
imageProps: {
src: iconPath
imageProps() {
return { src: `/img/empty/${this.icon}.svg` }
}
}
}

View File

@ -12,7 +12,7 @@
>
<a :href="link.url">
<hc-image
:image-props="imageProps(link.favicon)"
:image-props="{ src: link.favicon }"
alt="Social Media link"
width="16"
height="16"
@ -105,9 +105,6 @@ export default {
this.$toast.success(this.$t('settings.social-media.success')),
(this.value = '')
)
},
imageProps(favicon) {
return { src: favicon }
}
}
}