diff --git a/README.md b/README.md
index 3fcbfe8..411fe53 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,7 @@ A huge shoutout to [Tashif Khan](https://github.com/Tashifkhan) for generously p
- Customizable notification timing (1 hour, 1 day before)
- Multiple reminder types: browser notifications, email alerts
+- One-click unsubscribe link in contest update emails
- Contest difficulty and duration-based filtering
- Time zone intelligent scheduling
diff --git a/emails/ContestEmail.tsx b/emails/ContestEmail.tsx
index 578a6b9..859a949 100644
--- a/emails/ContestEmail.tsx
+++ b/emails/ContestEmail.tsx
@@ -13,6 +13,10 @@ import {
import * as React from "react";
import { Contest } from "@/model/Contest";
+type ContestEmailProps = Contest & {
+ unsubscribeUrl?: string;
+};
+
const platformStyles = {
LeetCode: {
color: "text-yellow-600",
@@ -52,7 +56,8 @@ export default function ContestEmail({
endTime,
duration,
url,
-}: Contest) {
+ unsubscribeUrl,
+}: ContestEmailProps) {
const theme = platformStyles[platform as keyof typeof platformStyles];
return (
@@ -88,10 +93,17 @@ export default function ContestEmail({
You’re receiving this email because you opted in for contest alerts.
+ {unsubscribeUrl && (
+
+
+ Unsubscribe from contest emails
+
+
+ )}