From 3c89458c6bb636730415d3afed4b6cef7bd32045 Mon Sep 17 00:00:00 2001 From: Atridad Lahiji <88056492+atridadl@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:50:52 -0600 Subject: [PATCH 1/2] Email Updates --- .env.example | 6 ++-- prisma/schema.prisma | 3 -- src/components/templates/Goodbye.tsx | 43 +++++++++++++++++-------- src/components/templates/Welcome.tsx | 48 ++++++++++++++++++++-------- src/env.mjs | 23 ++----------- 5 files changed, 69 insertions(+), 54 deletions(-) diff --git a/.env.example b/.env.example index 2c1dd75..03238c2 100644 --- a/.env.example +++ b/.env.example @@ -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="" diff --git a/prisma/schema.prisma b/prisma/schema.prisma index c100851..05ab092 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -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 diff --git a/src/components/templates/Goodbye.tsx b/src/components/templates/Goodbye.tsx index 26ae496..8f132dc 100644 --- a/src/components/templates/Goodbye.tsx +++ b/src/components/templates/Goodbye.tsx @@ -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> = ({ name }) => ( +export const Goodbye: React.FC> = ({ name }) => ( Sorry to see you go... 😭 - - - Farewell, {name}... - {"Were sorry to see you go."} - - Your data has been deleted, including all room history, user data, - votes, etc. - -
- Sprint Padawan Admin - Atridad -
- + + + +
+ {`Sprint +
+ Farewell, {name}... + {"Were sorry to see you go."} + + Your data has been deleted, including all room history, user data, + votes, etc. + +
+ — The Sprint Padawan team +
+ +
); diff --git a/src/components/templates/Welcome.tsx b/src/components/templates/Welcome.tsx index fc7432a..4f4372d 100644 --- a/src/components/templates/Welcome.tsx +++ b/src/components/templates/Welcome.tsx @@ -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> = ({ name }) => ( +export const Welcome: React.FC> = ({ name }) => ( 🎉 Welcome to Sprint Padawan! 🎉 - - - Welcome, {name}! - Thank you for signing up for Sprint Padawan! - - If at any point you encounter issues, please let me know at - support@sprintpadawan.dev. - -
- Sprint Padawan Admin - Atridad -
- + + + +
+ {`Sprint +
+ + 🎉 Welcome to Sprint Padawan, {name}! 🎉 + + + Hello {name}, + + Thank you for signing up for Sprint Padawan! + + If at any point you encounter issues, please let me know at + support@sprintpadawan.dev. + +
+ — The Sprint Padawan team +
+ +
); diff --git a/src/env.mjs b/src/env.mjs index d09bbf1..52bf8c8 100644 --- a/src/env.mjs +++ b/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(), From b89e9c89f38c89a945881f10a96a24456d0e3f93 Mon Sep 17 00:00:00 2001 From: Atridad Lahiji <88056492+atridadl@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:54:54 -0600 Subject: [PATCH 2/2] 1.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d4f267..bd645f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sprintpadawan", - "version": "1.2.0", + "version": "1.2.1", "description": "Plan. Sprint. Repeat.", "private": true, "scripts": {