Remove callback on Message component

This commit is contained in:
Wolfgang Huß 2022-05-05 12:05:30 +02:00
parent 4a64d1aa20
commit ab10edcf06

View File

@ -6,12 +6,7 @@
<p class="h1 test-message-headline">{{ headline }}</p>
<p class="h4 test-message-subtitle">{{ subtitle }}</p>
<hr />
<b-button
v-if="showButton()"
class="test-message-button"
:to="buttonLinkTo()"
@click="optionalCallback()"
>
<b-button v-if="showButton()" class="test-message-button" :to="buttonLinkTo()">
{{ buttonText }}
</b-button>
</div>
@ -28,17 +23,11 @@ export default {
subtitle: { type: String, required: true },
buttonText: { type: String, required: false, default: null },
linkTo: { type: String, required: false, default: null },
callback: { type: Function, required: false, default: null },
code: { type: String, required: false, default: null },
},
methods: {
optionalCallback() {
if (this.callback) {
this.callback()
}
},
showButton() {
return this.buttonText && (this.linkTo || this.callback)
return this.buttonText && this.linkTo
},
buttonLinkTo() {
return this.linkTo ? this.linkTo + (this.code ? `/${this.code}` : '') : null