diff --git a/frontend/src/components/ClipboardCopy.vue b/frontend/src/components/ClipboardCopy.vue
index df224bb67..4374f7182 100644
--- a/frontend/src/components/ClipboardCopy.vue
+++ b/frontend/src/components/ClipboardCopy.vue
@@ -23,7 +23,7 @@
data-test="copyLinkWithText"
@click="copyLinkWithText"
>
- {{ text }}
+ {{ linkText }}
diff --git a/frontend/src/components/TransactionLinks/TransactionLink.spec.js b/frontend/src/components/TransactionLinks/TransactionLink.spec.js
index e947a7818..da37173c9 100644
--- a/frontend/src/components/TransactionLinks/TransactionLink.spec.js
+++ b/frontend/src/components/TransactionLinks/TransactionLink.spec.js
@@ -28,7 +28,6 @@ const propsData = {
id: 12,
memo: 'Katzenauge, Eulenschrei, was verschwunden komm herbei!',
validUntil: '2022-03-30T14:22:40.000Z',
- text: '',
}
describe('TransactionLink', () => {
diff --git a/frontend/src/mixins/copyLinks.js b/frontend/src/mixins/copyLinks.js
index ee48dc4e1..1e339c49f 100644
--- a/frontend/src/mixins/copyLinks.js
+++ b/frontend/src/mixins/copyLinks.js
@@ -8,13 +8,6 @@ export const copyLinks = {
data() {
return {
canCopyLink: true,
- text: `${this.link}
-${this.$store.state.firstName} ${this.$t('transaction-link.send_you')} ${this.amount} Gradido.
-"${this.memo}"
-${this.$t('gdd_per_link.credit-your-gradido')} ${this.$t('gdd_per_link.validUntilDate', {
- date: this.$d(new Date(this.validUntil), 'short'),
- })}
-${this.$t('gdd_per_link.link-hint')}`,
}
},
methods: {
@@ -31,7 +24,7 @@ ${this.$t('gdd_per_link.link-hint')}`,
},
copyLinkWithText() {
navigator.clipboard
- .writeText(this.text)
+ .writeText(this.linkText)
.then(() => {
this.toastSuccess(this.$t('gdd_per_link.link-and-text-copied'))
})
@@ -41,4 +34,15 @@ ${this.$t('gdd_per_link.link-hint')}`,
})
},
},
+ computed: {
+ linkText() {
+ return `${this.link}
+${this.$store.state.firstName} ${this.$t('transaction-link.send_you')} ${this.amount} Gradido.
+"${this.memo}"
+${this.$t('gdd_per_link.credit-your-gradido')} ${this.$t('gdd_per_link.validUntilDate', {
+ date: this.$d(new Date(this.validUntil), 'short'),
+ })}
+${this.$t('gdd_per_link.link-hint')}`
+ },
+ },
}