Email Updates
This commit is contained in:
parent
67219b23d1
commit
c917fd1367
5 changed files with 69 additions and 54 deletions
|
@ -2,8 +2,10 @@
|
|||
DATABASE_URL=""
|
||||
|
||||
# Redis
|
||||
REDIS_URL=""
|
||||
REDIS_TTL=""
|
||||
UPSTASH_REDIS_REST_URL=""
|
||||
UPSTASH_REDIS_REST_TOKEN=""
|
||||
UPSTASH_RATELIMIT_REQUESTS=""
|
||||
UPSTASH_RATELIMIT_SECONDS=""
|
||||
|
||||
#Next Auth Core
|
||||
NEXTAUTH_SECRET=""
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
enum RoleValue {
|
||||
USER
|
||||
ADMIN
|
||||
|
|
|
@ -8,27 +8,42 @@ import {
|
|||
Preview,
|
||||
Text,
|
||||
Hr,
|
||||
Tailwind,
|
||||
Section,
|
||||
Img,
|
||||
} from "@react-email/components";
|
||||
import { env } from "~/env.mjs";
|
||||
|
||||
interface EmailTemplateProps {
|
||||
interface GoodbyeTemplateProps {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export const Goodbye: React.FC<Readonly<EmailTemplateProps>> = ({ name }) => (
|
||||
export const Goodbye: React.FC<Readonly<GoodbyeTemplateProps>> = ({ name }) => (
|
||||
<Html>
|
||||
<Head />
|
||||
<Preview>Sorry to see you go... 😭</Preview>
|
||||
<Body>
|
||||
<Container>
|
||||
<Heading className="text-4xl">Farewell, {name}...</Heading>
|
||||
<Text>{"Were sorry to see you go."}</Text>
|
||||
<Text>
|
||||
Your data has been deleted, including all room history, user data,
|
||||
votes, etc.
|
||||
</Text>
|
||||
<Hr />
|
||||
<Text>Sprint Padawan Admin - Atridad</Text>
|
||||
</Container>
|
||||
</Body>
|
||||
<Tailwind>
|
||||
<Body className="bg-white my-auto mx-auto font-sans">
|
||||
<Container className="border border-solid border-[#eaeaea] rounded my-[40px] mx-auto p-[20px] w-[465px]">
|
||||
<Section className="mt-[32px]">
|
||||
<Img
|
||||
src={`${env.NEXTAUTH_URL}/logo.webp`}
|
||||
width="40"
|
||||
height="37"
|
||||
alt={`Sprint Padawan Logo`}
|
||||
className="my-0 mx-auto"
|
||||
/>
|
||||
</Section>
|
||||
<Heading className="text-4xl">Farewell, {name}...</Heading>
|
||||
<Text>{"Were sorry to see you go."}</Text>
|
||||
<Text>
|
||||
Your data has been deleted, including all room history, user data,
|
||||
votes, etc.
|
||||
</Text>
|
||||
<Hr className="border border-solid border-[#eaeaea] my-[26px] mx-0 w-full" />
|
||||
<Text>— The Sprint Padawan team</Text>
|
||||
</Container>
|
||||
</Body>
|
||||
</Tailwind>
|
||||
</Html>
|
||||
);
|
||||
|
|
|
@ -8,27 +8,47 @@ import {
|
|||
Preview,
|
||||
Text,
|
||||
Hr,
|
||||
Tailwind,
|
||||
Section,
|
||||
Img,
|
||||
} from "@react-email/components";
|
||||
import { env } from "~/env.mjs";
|
||||
|
||||
interface EmailTemplateProps {
|
||||
interface WelcomeTemplateProps {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export const Welcome: React.FC<Readonly<EmailTemplateProps>> = ({ name }) => (
|
||||
export const Welcome: React.FC<Readonly<WelcomeTemplateProps>> = ({ name }) => (
|
||||
<Html>
|
||||
<Head />
|
||||
<Preview>🎉 Welcome to Sprint Padawan! 🎉</Preview>
|
||||
<Body>
|
||||
<Container>
|
||||
<Heading className="text-4xl">Welcome, {name}!</Heading>
|
||||
<Text>Thank you for signing up for Sprint Padawan!</Text>
|
||||
<Text>
|
||||
If at any point you encounter issues, please let me know at
|
||||
support@sprintpadawan.dev.
|
||||
</Text>
|
||||
<Hr />
|
||||
<Text>Sprint Padawan Admin - Atridad</Text>
|
||||
</Container>
|
||||
</Body>
|
||||
<Tailwind>
|
||||
<Body className="bg-white my-auto mx-auto font-sans">
|
||||
<Container className="border border-solid border-[#eaeaea] rounded my-[40px] mx-auto p-[20px] w-[465px]">
|
||||
<Section className="mt-[32px]">
|
||||
<Img
|
||||
src={`${env.NEXTAUTH_URL}/logo.webp`}
|
||||
width="40"
|
||||
height="37"
|
||||
alt={`Sprint Padawan Logo`}
|
||||
className="my-0 mx-auto"
|
||||
/>
|
||||
</Section>
|
||||
<Heading className="text-black text-[24px] font-normal text-center p-0 my-[30px] mx-0">
|
||||
🎉 Welcome to Sprint Padawan, <strong>{name}</strong>! 🎉
|
||||
</Heading>
|
||||
<Text className="text-black text-[14px] leading-[24px]">
|
||||
Hello {name},
|
||||
</Text>
|
||||
<Text>Thank you for signing up for Sprint Padawan!</Text>
|
||||
<Text>
|
||||
If at any point you encounter issues, please let me know at
|
||||
support@sprintpadawan.dev.
|
||||
</Text>
|
||||
<Hr className="border border-solid border-[#eaeaea] my-[26px] mx-0 w-full" />
|
||||
<Text>— The Sprint Padawan team</Text>
|
||||
</Container>
|
||||
</Body>
|
||||
</Tailwind>
|
||||
</Html>
|
||||
);
|
||||
|
|
23
src/env.mjs
23
src/env.mjs
|
@ -22,27 +22,8 @@ const server = z.object({
|
|||
// VERCEL_URL doesn't include `https` so it cant be validated as a URL
|
||||
process.env.VERCEL ? z.string().min(1) : z.string().url()
|
||||
),
|
||||
// Add `.min(1) on ID and SECRET if you want to make sure they're not empty
|
||||
GITHUB_CLIENT_ID: z.preprocess(
|
||||
// This makes Vercel deployments not fail if you don't set NEXTAUTH_URL
|
||||
// Since NextAuth.js automatically uses the VERCEL_URL if present.
|
||||
(str) =>
|
||||
process.env.NODE_ENV === "development"
|
||||
? process.env.GITHUB_CLIENT_ID_LOCAL
|
||||
: process.env.GITHUB_CLIENT_ID,
|
||||
// VERCEL_URL doesn't include `https` so it cant be validated as a URL
|
||||
z.string()
|
||||
),
|
||||
GITHUB_CLIENT_SECRET: z.preprocess(
|
||||
// This makes Vercel deployments not fail if you don't set NEXTAUTH_URL
|
||||
// Since NextAuth.js automatically uses the VERCEL_URL if present.
|
||||
(str) =>
|
||||
process.env.NODE_ENV === "development"
|
||||
? process.env.GITHUB_CLIENT_SECRET_LOCAL
|
||||
: process.env.GITHUB_CLIENT_SECRET,
|
||||
// VERCEL_URL doesn't include `https` so it cant be validated as a URL
|
||||
z.string()
|
||||
),
|
||||
GITHUB_CLIENT_ID: z.string(),
|
||||
GITHUB_CLIENT_SECRET: z.string(),
|
||||
GOOGLE_CLIENT_ID: z.string(),
|
||||
GOOGLE_CLIENT_SECRET: z.string(),
|
||||
ABLY_PRIVATE_KEY: z.string(),
|
||||
|
|
Loading…
Add table
Reference in a new issue