diff --git a/components/ad-inline.vue b/components/ad-inline.vue index 0f65f11..d46abfa 100644 --- a/components/ad-inline.vue +++ b/components/ad-inline.vue @@ -38,8 +38,6 @@ /* Carbon ads */ import CarbonInline from './carbon-inline.vue' -const transparentImage = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' - const ads = { // Since Vue renders the ad on the server // but destroys the ad when hydrating on @@ -48,7 +46,7 @@ const ads = { // and so that our ad css still get's imported. 'placeholder': { url: '/', - imageSrc: transparentImage, + imageSrc: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', imageAlt: '', copy: '', corner: '', @@ -98,16 +96,9 @@ export default { default: () => ({}) } }, - data () { - return { - // We store imageSrc in data - // so that vue knows to update attribute after hydration. - imageSrc: transparentImage, - } - }, computed: { adName () { - // console.log( 'kindName', this.page?.kindName ) + console.log( 'kindName', this.page?.kindName ) if ( this.name === 'placeholder' ) { return 'placeholder' @@ -122,10 +113,13 @@ export default { }, ad () { return ads[ this.adName ] + }, + imageSrc () { + return this.ad.imageSrc } }, mounted () { - this.imageSrc = this.ad.imageSrc + console.log( 'mounted', this.adName ) } }