Skip to content

Conversation

@stevenphanny
Copy link
Contributor

To be changed:

  • Basic form added to contact page
  • Email template (what we see in Gmail when receiving a message)

@vercel
Copy link

vercel bot commented Jan 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
monashcoding-site Ready Ready Preview, Comment Jan 25, 2026 5:52am

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR wires up a new contact form to send emails via Resend, adds a styled email template, and introduces the necessary environment/configuration changes. It also tweaks the visual styling of the contact page and social/contact cards.

Changes:

  • Add Resend, React Email-related dependencies, and supporting packages to package.json/package-lock.json.
  • Introduce an EmailTemplate React component used by a new /api/send route that sends contact form submissions via Resend.
  • Enhance ContactPageClient with a client-side validated contact form that posts to /api/send, and adjust styling for contact methods/social links.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
package.json Adds @react-email/components, @react-email/render, and resend dependencies to support server-side email rendering and delivery.
package-lock.json Locks the dependency tree for the new email-related packages and their transitive dependencies.
components/EmailTemplate.tsx New HTML table-based email layout for incoming contact form messages, used as the React template passed to Resend.
components/ContactPageClient.tsx Implements the contact form UI, client-side validation, POST to /api/send, and some updated styling for contact blocks and social icons.
app/api/send/route.ts New API route that reads form JSON, instantiates Resend with RESEND_API_KEY, and sends an email using EmailTemplate.
.env.example Documents the new RESEND_API_KEY configuration variable required for the email feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import { EmailTemplate } from '../../../components/EmailTemplate';
import { Resend } from 'resend';

const resend = new Resend(process.env.RESEND_API_KEY);
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RESEND_API_KEY is read directly from process.env when constructing the Resend client, but there is no guard for the case where it is missing or empty; this will cause failures that may be hard to diagnose. Consider explicitly checking for a defined API key and returning a clear 500 response (or throwing during startup) with a descriptive error message when it is not configured.

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct, @stevenphanny

Copy link
Contributor Author

@stevenphanny stevenphanny Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct, @stevenphanny

I've added a check in my most recent commit. Should now alert on startup.

"postprocessing": "^6.38.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"resend": "^6.7.0",
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the resend dependency at this version pulls in packages whose engines fields require Node.js >= 20 (see package-lock.json), which effectively raises the minimum supported Node version for the app. Please confirm that your deployment and local environments are on Node 20+ or consider pinning to a compatible version if you need to support older Node runtimes.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

@stevenphanny stevenphanny Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Swofty-Developments is this fine to leave added in?

@Swofty-Developments
Copy link
Member

image Currently it doesn't compile

stevenphanny and others added 5 commits January 25, 2026 16:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@monashcoding monashcoding deleted a comment from Copilot AI Jan 25, 2026
@stevenphanny
Copy link
Contributor Author

stevenphanny commented Jan 25, 2026

image Currently it doesn't compile

mb didn't add the API key to vercel. Just added it. Should work now?

@Swofty-Developments Swofty-Developments merged commit df68867 into main Jan 25, 2026
2 checks passed
@stevenphanny stevenphanny self-assigned this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants