From 02527d31c75edfef26604544630c7d945888570e Mon Sep 17 00:00:00 2001 From: gloria Date: Fri, 19 Sep 2025 13:05:06 +0200 Subject: [PATCH] feat: add email blog section --- .../email-templates/components/Blog.tsx | 39 +++++++++++++++++++ apps/contact/email-templates/contact.tsx | 27 ++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 apps/contact/email-templates/components/Blog.tsx diff --git a/apps/contact/email-templates/components/Blog.tsx b/apps/contact/email-templates/components/Blog.tsx new file mode 100644 index 00000000..ac91d6e7 --- /dev/null +++ b/apps/contact/email-templates/components/Blog.tsx @@ -0,0 +1,39 @@ +import { Column, Img, Link, Row, Section, Text } from "@react-email/components"; + +const baseUrl = "https://www.crocoder.dev"; + +const Blog = ({ + blogLinks = [], + description, +}: { + blogLinks: Array<{ path: string; title: string; imageUrl: string }>; + description: string; +}) => { + return ( +
+ + + {description} + + + + {blogLinks.map(({ path, title, imageUrl }) => { + return ( + + + + {title} + + + ); + })} + +
+ ); +}; +export default Blog; diff --git a/apps/contact/email-templates/contact.tsx b/apps/contact/email-templates/contact.tsx index 0656e72e..7173529c 100644 --- a/apps/contact/email-templates/contact.tsx +++ b/apps/contact/email-templates/contact.tsx @@ -1,4 +1,5 @@ -import { Text, Section } from "@react-email/components"; +import { Hr, Section, Text } from "@react-email/components"; +import Blog from "./components/Blog"; import Layout from "./components/Layout"; const ContactTemplate = () => { @@ -24,6 +25,30 @@ const ContactTemplate = () => { Best regards,
The CroCoder team +
+ );