mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-30 02:36:30 +02:00
💬 Update email templates (#562)
This commit is contained in:
parent
7470cfecdf
commit
8c6c3e4885
5 changed files with 22 additions and 56 deletions
|
@ -73,7 +73,7 @@ export const auth = router({
|
||||||
|
|
||||||
await sendEmail("RegisterEmail", {
|
await sendEmail("RegisterEmail", {
|
||||||
to: input.email,
|
to: input.email,
|
||||||
subject: "Complete your registration",
|
subject: "Please verify your email address",
|
||||||
props: {
|
props: {
|
||||||
code,
|
code,
|
||||||
name: input.name,
|
name: input.name,
|
||||||
|
|
|
@ -138,7 +138,7 @@ export const EmailLayout = ({
|
||||||
{footNote ? (
|
{footNote ? (
|
||||||
<>
|
<>
|
||||||
<Hr />
|
<Hr />
|
||||||
<SmallText>{footNote}</SmallText>
|
<Text light={true}>{footNote}</Text>
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
</Section>
|
</Section>
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
import { absoluteUrl } from "@rallly/utils";
|
|
||||||
import { Hr } from "@react-email/components";
|
|
||||||
|
|
||||||
import { EmailLayout } from "./components/email-layout";
|
import { EmailLayout } from "./components/email-layout";
|
||||||
import {
|
import { Button, Domain, Heading, Text } from "./components/styled-components";
|
||||||
Button,
|
import { getDomain } from "./components/utils";
|
||||||
Heading,
|
|
||||||
Link,
|
|
||||||
Section,
|
|
||||||
Text,
|
|
||||||
} from "./components/styled-components";
|
|
||||||
import { getDomain, removeProtocalFromUrl } from "./components/utils";
|
|
||||||
|
|
||||||
interface LoginEmailProps {
|
interface LoginEmailProps {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -27,11 +18,8 @@ export const LoginEmail = ({
|
||||||
footNote={
|
footNote={
|
||||||
<>
|
<>
|
||||||
You're receiving this email because a request was made to login
|
You're receiving this email because a request was made to login
|
||||||
to{" "}
|
to <Domain />. If this wasn't you, let us know by replying to
|
||||||
<Link href={absoluteUrl()}>
|
this email.
|
||||||
{removeProtocalFromUrl(absoluteUrl())}
|
|
||||||
</Link>
|
|
||||||
. If this wasn't you, let us know by replying to this email.
|
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
recipientName={name}
|
recipientName={name}
|
||||||
|
@ -42,14 +30,12 @@ export const LoginEmail = ({
|
||||||
Log in to {getDomain()}
|
Log in to {getDomain()}
|
||||||
</Button>
|
</Button>
|
||||||
<Text light={true}>This link is valid for 15 minutes</Text>
|
<Text light={true}>This link is valid for 15 minutes</Text>
|
||||||
<Section>
|
|
||||||
<Text>
|
<Text>
|
||||||
Alternatively, you can enter this 6-digit verification code directly.
|
Alternatively, you can enter this 6-digit verification code directly.
|
||||||
</Text>
|
</Text>
|
||||||
<Heading as="h1" className="tracking-widest" id="code">
|
<Heading as="h1" className="tracking-widest" id="code">
|
||||||
{code}
|
{code}
|
||||||
</Heading>
|
</Heading>
|
||||||
</Section>
|
|
||||||
</EmailLayout>
|
</EmailLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
import { absoluteUrl } from "@rallly/utils";
|
|
||||||
|
|
||||||
import { EmailLayout } from "./components/email-layout";
|
import { EmailLayout } from "./components/email-layout";
|
||||||
import { Domain, Heading, Link, Text } from "./components/styled-components";
|
import { Domain, Heading, Text } from "./components/styled-components";
|
||||||
import { getDomain } from "./components/utils";
|
|
||||||
|
|
||||||
interface RegisterEmailProps {
|
interface RegisterEmailProps {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -18,20 +15,15 @@ export const RegisterEmail = ({
|
||||||
footNote={
|
footNote={
|
||||||
<>
|
<>
|
||||||
You're receiving this email because a request was made to
|
You're receiving this email because a request was made to
|
||||||
register an account on{" "}
|
register an account on <Domain />.
|
||||||
<Link className="text-primary-500" href={absoluteUrl()}>
|
|
||||||
{getDomain()}
|
|
||||||
</Link>
|
|
||||||
. If this wasn't you, please ignore this email.
|
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
recipientName={name}
|
recipientName={name}
|
||||||
preview={`Your 6-digit code is: ${code}`}
|
preview={`Your 6-digit code is: ${code}`}
|
||||||
>
|
>
|
||||||
<Text>
|
<Text>
|
||||||
Use this code to complete the verification process on <Domain />
|
Please use the following 6-digit verification code to verify your email:
|
||||||
</Text>
|
</Text>
|
||||||
<Heading>Your 6-digit code is:</Heading>
|
|
||||||
<Heading as="h1" className="font-sans tracking-widest" id="code">
|
<Heading as="h1" className="font-sans tracking-widest" id="code">
|
||||||
{code}
|
{code}
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
import { EmailLayout } from "./components/email-layout";
|
import { EmailLayout } from "./components/email-layout";
|
||||||
import {
|
import { Button, Link, Section, Text } from "./components/styled-components";
|
||||||
Button,
|
|
||||||
Card,
|
|
||||||
Heading,
|
|
||||||
Link,
|
|
||||||
Section,
|
|
||||||
SmallText,
|
|
||||||
Text,
|
|
||||||
} from "./components/styled-components";
|
|
||||||
|
|
||||||
type EnableNotificationsEmailProps = {
|
type EnableNotificationsEmailProps = {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -37,16 +29,12 @@ export const EnableNotificationsEmail = ({
|
||||||
Would you like to get notified when participants respond to{" "}
|
Would you like to get notified when participants respond to{" "}
|
||||||
<strong>{title}</strong>?
|
<strong>{title}</strong>?
|
||||||
</Text>
|
</Text>
|
||||||
<Card>
|
|
||||||
<Heading>Enable notifications</Heading>
|
|
||||||
<Text>You will get an email when someone responds to the poll.</Text>
|
|
||||||
<Section>
|
<Section>
|
||||||
<Button href={verificationLink} id="verifyEmailUrl">
|
<Button href={verificationLink} id="verifyEmailUrl">
|
||||||
Yes, enable notifications
|
Yes, enable notifications
|
||||||
</Button>
|
</Button>
|
||||||
</Section>
|
</Section>
|
||||||
<SmallText>The link will expire in 15 minutes.</SmallText>
|
<Text light={true}>The link will expire in 15 minutes.</Text>
|
||||||
</Card>
|
|
||||||
</EmailLayout>
|
</EmailLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue