2025-08-04 17:45:44 +02:00
|
|
|
import { Button, Heading, Row, Section, Text } from "@react-email/components";
|
2026-04-03 11:51:55 +02:00
|
|
|
import z from "zod";
|
2025-10-20 17:27:32 +02:00
|
|
|
import { env } from "~/env";
|
2025-08-04 17:45:44 +02:00
|
|
|
import Base from "./base";
|
|
|
|
|
|
2026-04-03 11:51:55 +02:00
|
|
|
export const ContattoAnnuncioMailTag = "contattoAnnuncioEmail";
|
|
|
|
|
|
|
|
|
|
export const ContattoAnnuncioPropsSchema = z.object({
|
|
|
|
|
nome: z.string(),
|
|
|
|
|
codice: z.string(),
|
|
|
|
|
email: z.email(),
|
|
|
|
|
telefono: z.string(),
|
|
|
|
|
messaggio: z.string(),
|
|
|
|
|
});
|
2025-08-04 17:45:44 +02:00
|
|
|
|
|
|
|
|
const ContattoAnnuncioEmail = ({
|
2025-08-28 18:27:07 +02:00
|
|
|
nome,
|
|
|
|
|
codice,
|
|
|
|
|
email,
|
|
|
|
|
telefono,
|
|
|
|
|
messaggio,
|
2026-04-03 11:51:55 +02:00
|
|
|
}: z.infer<typeof ContattoAnnuncioPropsSchema>) => {
|
2025-08-28 18:27:07 +02:00
|
|
|
return (
|
|
|
|
|
<Base preview="Contatto Email">
|
|
|
|
|
<>
|
|
|
|
|
<Heading className="text-center text-3xl leading-8">
|
|
|
|
|
Richiesta di contatto
|
|
|
|
|
</Heading>
|
2025-08-04 17:45:44 +02:00
|
|
|
|
2025-08-28 18:27:07 +02:00
|
|
|
<Section className="px-5 text-left text-base md:px-12">
|
|
|
|
|
<Row>
|
2026-01-26 17:45:52 +01:00
|
|
|
<Text>Data: {new Date().toLocaleString("it-IT")}</Text>
|
2025-08-28 18:27:07 +02:00
|
|
|
<Text>Nome: {nome}</Text>
|
|
|
|
|
<Text>Annuncio: {codice}</Text>
|
|
|
|
|
<Text>Telefono: {telefono}</Text>
|
|
|
|
|
<Text>Email: {email}</Text>
|
|
|
|
|
<Text>Messaggio: {messaggio}</Text>
|
|
|
|
|
</Row>
|
|
|
|
|
</Section>
|
|
|
|
|
<Section className="mb-5">
|
|
|
|
|
<Button
|
2025-10-10 16:18:43 +02:00
|
|
|
className="mx-auto box-border inline-flex h-10 items-center justify-center whitespace-nowrap rounded-md bg-neutral-100 px-4 py-2 text-center align-middle font-semibold text-neutral-900"
|
2025-10-20 17:27:32 +02:00
|
|
|
href={`${env.BASE_URL}/annuncio/${codice}`}
|
2025-08-28 18:27:07 +02:00
|
|
|
>
|
|
|
|
|
Vai all'annuncio
|
|
|
|
|
</Button>
|
|
|
|
|
</Section>
|
|
|
|
|
</>
|
|
|
|
|
</Base>
|
|
|
|
|
);
|
2025-08-04 17:45:44 +02:00
|
|
|
};
|
|
|
|
|
export default ContattoAnnuncioEmail;
|