From 04993224dcaedd6bd31088dfd938b0f38524fa88 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Tue, 16 Sep 2025 14:03:08 +0200 Subject: [PATCH] Nice emails --- backend/email/emails/new-search_alerts.tsx | 129 ++++++++++++--------- backend/email/emails/utils.tsx | 4 +- 2 files changed, 77 insertions(+), 56 deletions(-) diff --git a/backend/email/emails/new-search_alerts.tsx b/backend/email/emails/new-search_alerts.tsx index 3e681f99..a319f56b 100644 --- a/backend/email/emails/new-search_alerts.tsx +++ b/backend/email/emails/new-search_alerts.tsx @@ -1,27 +1,8 @@ -import { - Body, - Button, - Container, - Head, - Html, - Img, - Link, - Preview, - Section, - Text, -} from '@react-email/components' +import {Body, Container, Head, Html, Link, Preview, Section, Text,} from '@react-email/components' import {type User} from 'common/user' -import {type LoverRow} from 'common/love/lover' -import { - jamesLover, - jamesUser, - sinclairLover, - sinclairUser, -} from './functions/mock' +import {sinclairUser,} from './functions/mock' import {DOMAIN} from 'common/envs/constants' -import {getLoveOgImageUrl} from 'common/love/og-image' -import {button, container, content, Footer, imageContainer, main, paragraph, profileImage} from "email/utils"; -import {sendSearchAlertsEmail} from "email/functions/helpers"; +import {container, content, Footer, main, paragraph} from "email/utils"; import {MatchesType} from "common/love/bookmarked_searches"; import {formatFilters, locationType} from "common/searches" import {FilterFields} from "common/filters"; @@ -44,33 +25,77 @@ export const NewSearchAlertsEmail = ({ return ( - Some people recently matched your bookmarked searches! + New people share your values — reach out and connect
Hi {name}, - The following people matched your bookmarked searches in the past 24h: - -
    - {(matches || []).map((match) => ( -
  1. - {formatFilters(match.description.filters as Partial, match.description.location as locationType)} - {match.matches.map(p => p.toString()).join(', ')} -
  2. - ))} -
+ + In the past 24 hours, new people joined Compass whose values and + interests align with your saved searches. Compass is a gift from the + community, and it comes alive when people like you take the step to + connect with one another. + + + {(matches || []).map((match) => ( +
+ + {formatFilters( + match.description.filters as Partial, + match.description.location as locationType + )?.join(" • ")} + + + {match.matches.map((p, i) => ( + + {p.name} ( + + @{p.username} + + ) + {i < match.matches.length - 1 && ", "} + + ))} + +
+ ))} + +
+ + If someone resonates with you, reach out. A simple hello can be the + start of a meaningful friendship, collaboration, or relationship. + + + Start a Conversation + +
+ + + Compass is built and sustained by the community — no ads, no hidden + algorithms, no subscriptions. Your presence and participation make it + possible.