Skip to content

Commit 996330c

Browse files
committed
Merge branch 'fix/welcome-email-props'
2 parents 978c738 + 5496a3b commit 996330c

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"app": patch
3+
---
4+
5+
Fix the Vue warning `[Vue warn]: Missing required prop: "name"` when sending
6+
the welcome email: the template declared a required `name` prop but the
7+
`EmailService` passes `username` and `redirectUrl`. Aligned the props with
8+
what the service actually sends, and wired `redirectUrl` into the call-to-
9+
action button (it was hardcoded to `https://app.shelve.cloud` before).

apps/shelve/server/emails/welcomeEmail.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ import {
1717
} from '@vue-email/components'
1818
1919
defineProps({
20-
name: {
20+
username: {
21+
type: String,
22+
required: true
23+
},
24+
redirectUrl: {
2125
type: String,
2226
required: true
2327
}
@@ -40,7 +44,7 @@ defineProps({
4044
/>
4145
</Head>
4246
<Preview>
43-
Welcome to Shelve, {{ name }}
47+
Welcome to Shelve, {{ username }}
4448
</Preview>
4549
<Body class="m-0 p-0 font-sans" style="background-color: #010101;">
4650
<Container class="mx-auto my-10 max-w-[480px] px-6">
@@ -68,7 +72,7 @@ defineProps({
6872
class="text-sm m-0 mb-2 leading-relaxed"
6973
style="color: rgba(255, 255, 255, 0.6);"
7074
>
71-
Hi <span style="color: #ffffff;">{{ name }}</span>,
75+
Hi <span style="color: #ffffff;">{{ username }}</span>,
7276
</Text>
7377

7478
<Text
@@ -80,7 +84,7 @@ defineProps({
8084

8185
<!-- CTA Button -->
8286
<Button
83-
href="https://app.shelve.cloud"
87+
:href="redirectUrl"
8488
class="inline-block rounded-md px-5 py-2.5 text-sm font-medium no-underline"
8589
style="background-color: #ffffff; color: #010101;"
8690
>

0 commit comments

Comments
 (0)