diff --git a/src/components/layout/header.tsx b/src/components/layout/header.tsx index 0cb692d..45a0a6b 100644 --- a/src/components/layout/header.tsx +++ b/src/components/layout/header.tsx @@ -1,5 +1,7 @@ import Image from "next/image"; +import { ExternalLink } from "lucide-react"; import { cn } from "@/lib/utils"; +import { getPortalLoginUrl } from "@/lib/portal"; interface HeaderProps { className?: string; @@ -7,7 +9,12 @@ interface HeaderProps { export function Header({ className }: HeaderProps) { return ( -
+
Paso Robles Food Co-op Logo + +
); } diff --git a/src/services/email.ts b/src/services/email.ts index 7ca9e38..f54db5e 100644 --- a/src/services/email.ts +++ b/src/services/email.ts @@ -64,7 +64,7 @@ export async function sendReferralEmails({ const unsubscribeApiUrl = `${env.APP_URL}/api/unsubscribe?token=${unsubscribeToken}`; const joinUrl = `https://www.pasofoodcooperative.com/join-now1.html?enterReferral=${referralCode}`; - const textContent = `Hi ${prospect.prospectName},\n\n${memberName} thinks you'd be a great fit for the Paso Robles Food Co-op. We are a member-owned grocery cooperative in Paso Robles, and each new member gets a vote in how we run the store.\n\nMembers shop at the Co-op, attend monthly meetings on the 4th Wednesday at 6 pm, and help choose which local farms and producers we carry. Annual membership is $25.\n\nUse referral code ${referralCode} when you register: ${joinUrl}\n\nQuestions? Reach us at info@pasofoodcooperative.com or visit pasofoodcooperative.com.\n\n---\nThis email was sent on behalf of a Co-op member who thought you might be interested.\nPaso Robles Food Cooperative, Inc. P.O. Box 922, Paso Robles, CA 93447\nUnsubscribe: ${unsubscribeUrl}`; + const textContent = `Hello ${prospect.prospectName},\n\nWe're excited to let you know that ${memberName}, thinks you'd love being a part of the Paso Robles Food Co-op!\n\nAt the Co-op, we're all about building a stronger community by connecting members to fresh, healthy, and locally-sourced food. As a member owner, you'll enjoy:\n\n- Supporting local farmers and food producers 🌱\n- A say in how the Co-op operates (yes, you're an owner!) 🗳️\n- Exclusive discounts and special events 🎉\n\nIt's easy to join the Co-op and start making an impact in our community! Just click the link below to complete your membership registration:\n\n👉 Join Now: ${joinUrl}\n\nYour referral code is ${referralCode}—be sure to confirm/enter it during registration.\n\nFeel free to reach out if you have any questions or want to learn more about what makes the Paso Robles Food Co-op special. Our monthly meeting is every 4th Wednesday at 6pm. All details and info at our website: www.pasofoodcooperative.com\n\nLooking forward to welcoming you into our growing Co-op family!\n\nWarm regards,\n${memberName} and The Paso Robles Food Co-op Member Owners\n\n📧 info@pasofoodcooperative.com\n🌐 www.pasofoodcooperative.com\n\n---\nThis email was sent on behalf of a Co-op member who thought you might be interested.\nPaso Robles Food Cooperative, Inc. P.O. Box 922, Paso Robles, CA 93447\nUnsubscribe: ${unsubscribeUrl}`; await sendBrevoEmail({ sender: { name: "Paso Robles Food Co-op", email: env.FROM_EMAIL ?? "noreply@example.com" }, @@ -112,23 +112,30 @@ export function generateReferralEmailHtml( - - Hi ${safeName}, + + Hello ${safeName}, - ${safeMember} thinks you'd be a great fit for the Paso Robles Food Co-op. We are a member-owned grocery cooperative in Paso Robles, and each new member gets a vote in how we run the store. + We're excited to let you know that ${safeMember}, thinks you'd love being a part of the Paso Robles Food Co-op! + + + + + At the Co-op, we're all about building a stronger community by connecting members to fresh, healthy, and locally-sourced food. As a member owner, you'll enjoy: - Members shop at the Co-op, attend monthly meetings on the 4th Wednesday at 6 pm, and help choose which local farms and producers we carry. Annual membership is $25. + • Supporting local farmers and food producers 🌱
+ • A say in how the Co-op operates (yes, you're an owner!) 🗳️
+ • Exclusive discounts and special events 🎉 - Use referral code ${safeCode} when you register: + It's easy to join the Co-op and start making an impact in our community! Just click the link below to complete your membership registration: @@ -136,15 +143,27 @@ export function generateReferralEmailHtml(
- Join the Co-op + Join Now
+ + + Your referral code is ${safeCode}—be sure to confirm/enter it during registration. + + + + + Feel free to reach out if you have any questions or want to learn more about what makes the Paso Robles Food Co-op special. Our monthly meeting is every 4th Wednesday at 6pm. All details and info at our website: www.pasofoodcooperative.com. + + - Questions? Reach us at info@pasofoodcooperative.com or visit pasofoodcooperative.com. + Looking forward to welcoming you into our growing Co-op family!

+ Warm regards,
+ ${safeMember} and The Paso Robles Food Co-op Member Owners @@ -152,6 +171,8 @@ export function generateReferralEmailHtml( + 📧 info@pasofoodcooperative.com
+ 🌐 www.pasofoodcooperative.com
This email was sent on behalf of a Co-op member who thought you might be interested.
Paso Robles Food Cooperative, Inc. P.O. Box 922, Paso Robles, CA 93447
Unsubscribe diff --git a/test/services/email.test.ts b/test/services/email.test.ts index 2150c61..3452c5d 100644 --- a/test/services/email.test.ts +++ b/test/services/email.test.ts @@ -127,8 +127,8 @@ describe("sendReferralEmails", () => { }); const html = mockBrevoSend.mock.calls[0][0].htmlContent; - expect(html).toContain("Hi <script>"); - expect(html).not.toContain("Hi