From 162c4568342e910897920be0b69402772492705f Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Tue, 17 Mar 2026 18:42:25 +0100 Subject: [PATCH] refactor: remove ShareAnnunci email component and its related type from mailer --- apps/infoalloggi/emails/share-annunci.tsx | 105 ------------------ .../infoalloggi/src/server/services/mailer.ts | 8 -- 2 files changed, 113 deletions(-) delete mode 100644 apps/infoalloggi/emails/share-annunci.tsx diff --git a/apps/infoalloggi/emails/share-annunci.tsx b/apps/infoalloggi/emails/share-annunci.tsx deleted file mode 100644 index 4ae0431..0000000 --- a/apps/infoalloggi/emails/share-annunci.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { - Heading, - Img, - Link, - Row, - Section, - Text, -} from "@react-email/components"; -import { env } from "~/env"; -import Base2 from "./base2"; -export type ShareAnnunci_NewMail = { - mailType: "shareAnnunci"; - props: ShareAnnunciProps; -}; - -type ShareAnnunciProps = { - nome: string; - annunci?: { - titolo: string | null; - immagine: string | null; - codice: string; - prezzo: number; - }[]; -}; -//TODO finire - -const ShareAnnunci = ({ nome, annunci }: ShareAnnunciProps) => { - nome = ""; - annunci = [ - { - titolo: "MAROSTICA A 2 KM DAL CENTRO MANSARDA - SUBITO", - codice: "4493B", - prezzo: 40000, - immagine: "5434eb7f088a5b5a", - }, - { - titolo: "MAROSTICA A 2 KM DAL CENTRO MANSARDA - SUBITO", - codice: "4493B", - prezzo: 40000, - immagine: "5434eb7f088a5b5a", - }, - ]; - - return ( - - <> - - Procedi ora su Infoalloggi.it - -
- - - Ciao {nome},
- Accedi ora al servizio di ricerca Infoalloggi, dove potrai andare - a contattare direttamente i proprietari degli immobili - disponibili. -
-
- -
- Annunci selezionati per te: - {annunci?.map((annuncio) => ( - <> -
- - {`Annuncio - - -
- Codice: {annuncio.codice} -
- - {annuncio.titolo || "N/A"} - - - Prezzo: € - {(annuncio.prezzo / 1e2).toFixed(2)} - - - Scheda dell'annuncio → - -
-
- - ))} -
-
- -
- ); -}; - -export default ShareAnnunci; diff --git a/apps/infoalloggi/src/server/services/mailer.ts b/apps/infoalloggi/src/server/services/mailer.ts index d27410b..af23443 100644 --- a/apps/infoalloggi/src/server/services/mailer.ts +++ b/apps/infoalloggi/src/server/services/mailer.ts @@ -31,7 +31,6 @@ import type { ContattiConScheda_NewMail } from "emails/scheda-contatti"; import EmailContattiConScheda from "emails/scheda-contatti"; import type { ServizioAttivato_NewMail } from "emails/servizio-attivato"; import ServizioAttivato from "emails/servizio-attivato"; -import ShareAnnunci, { type ShareAnnunci_NewMail } from "emails/share-annunci"; import VerificaEmail, { type VerificaEmail_NewMail, } from "emails/VerificaEmail"; @@ -91,7 +90,6 @@ export type MailsTemplates = | Recesso_NewMail | RegistrazioneAvvenuta_NewMail | VerificaEmail_NewMail - | ShareAnnunci_NewMail | Generic_NewMail | SchedaContatto_NewMail | Invito_NewMail @@ -162,12 +160,6 @@ export const genMail = async ({ ...mail }: MailsTemplates) => { title = "Verifica email"; break; - case "shareAnnunci": - mailComponent = ShareAnnunci({ - ...mail.props, - }); - title = "Onboarding Servizio"; - break; case "generic": mailComponent = Generic({ ...mail.props,