Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/fix-welcome-email-props.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"app": patch
---

Fix the Vue warning `[Vue warn]: Missing required prop: "name"` when sending
the welcome email: the template declared a required `name` prop but the
`EmailService` passes `username` and `redirectUrl`. Aligned the props with
what the service actually sends, and wired `redirectUrl` into the call-to-
action button (it was hardcoded to `https://app.shelve.cloud` before).
12 changes: 8 additions & 4 deletions apps/shelve/server/emails/welcomeEmail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ import {
} from '@vue-email/components'

defineProps({
name: {
username: {
type: String,
required: true
},
redirectUrl: {
type: String,
required: true
}
Expand All @@ -40,7 +44,7 @@ defineProps({
/>
</Head>
<Preview>
Welcome to Shelve, {{ name }}
Welcome to Shelve, {{ username }}
</Preview>
<Body class="m-0 p-0 font-sans" style="background-color: #010101;">
<Container class="mx-auto my-10 max-w-[480px] px-6">
Expand Down Expand Up @@ -68,7 +72,7 @@ defineProps({
class="text-sm m-0 mb-2 leading-relaxed"
style="color: rgba(255, 255, 255, 0.6);"
>
Hi <span style="color: #ffffff;">{{ name }}</span>,
Hi <span style="color: #ffffff;">{{ username }}</span>,
</Text>

<Text
Expand All @@ -80,7 +84,7 @@ defineProps({

<!-- CTA Button -->
<Button
href="https://app.shelve.cloud"
:href="redirectUrl"
class="inline-block rounded-md px-5 py-2.5 text-sm font-medium no-underline"
style="background-color: #ffffff; color: #010101;"
>
Expand Down
Loading