102 lines
2.5 KiB
TypeScript
102 lines
2.5 KiB
TypeScript
import { siteConfig } from "@/config/site";
|
|
import { getBaseUrl } from "@/lib/utils";
|
|
import {
|
|
Body,
|
|
Button,
|
|
Container,
|
|
Head,
|
|
Hr,
|
|
Html,
|
|
Img,
|
|
Link,
|
|
Preview,
|
|
Section,
|
|
Text,
|
|
} from "@react-email/components";
|
|
import {
|
|
anchor,
|
|
box,
|
|
button,
|
|
container,
|
|
footer,
|
|
footerLeft,
|
|
footerRight,
|
|
hr,
|
|
main,
|
|
paragraph,
|
|
} from "./email-formats";
|
|
|
|
interface VerifyEmailProps {
|
|
confirmLink?: string;
|
|
}
|
|
|
|
/**
|
|
* https://demo.react.email/preview/welcome/stripe-welcome
|
|
*/
|
|
export const VerifyEmail = ({ confirmLink }: VerifyEmailProps) => {
|
|
const baseUrl = getBaseUrl();
|
|
return (
|
|
<Html>
|
|
<Head />
|
|
<Preview>Confirm your email address</Preview>
|
|
<Body style={main}>
|
|
<Container style={container}>
|
|
<Section style={box}>
|
|
<Img
|
|
src={`${baseUrl}/logo.png`}
|
|
width="32"
|
|
height="32"
|
|
alt="Logo"
|
|
/>
|
|
<Hr style={hr} />
|
|
<Text style={paragraph}>Confirm your email address</Text>
|
|
<Text style={paragraph}>
|
|
Thanks for starting the new account creation process. We want to
|
|
make sure it's really you. Please click the confirmation link to
|
|
continue.
|
|
</Text>
|
|
<Button style={button} href={confirmLink}>
|
|
Confirm Email
|
|
</Button>
|
|
<Hr style={hr} />
|
|
<Text style={paragraph}>
|
|
If you don't want to create an account, you can ignore this
|
|
message.
|
|
</Text>
|
|
<Text style={paragraph}>
|
|
Thanks, <br />
|
|
The{" "}
|
|
<Link style={anchor} href={baseUrl}>
|
|
{siteConfig.name}
|
|
</Link>{" "}
|
|
team
|
|
</Text>
|
|
<Hr style={hr} />
|
|
<Text style={footer}>
|
|
<span style={footerLeft}>
|
|
© {new Date().getFullYear()}
|
|
All Rights Reserved.
|
|
</span>
|
|
<span style={footerRight}>
|
|
<Link style={anchor} href={siteConfig.links.twitter}>
|
|
Twitter
|
|
</Link>
|
|
|
|
<Link style={anchor} href={siteConfig.links.github}>
|
|
GitHub
|
|
</Link>
|
|
</span>
|
|
</Text>
|
|
</Section>
|
|
</Container>
|
|
</Body>
|
|
</Html>
|
|
);
|
|
};
|
|
|
|
VerifyEmail.PreviewProps = {
|
|
confirmLink: "https://demo.mkdirs.com",
|
|
} as VerifyEmailProps;
|
|
|
|
export default VerifyEmail;
|