diff --git a/apps/infoalloggi/emails/base.tsx b/apps/infoalloggi/emails/base.tsx
index e5a0eb9..53f7181 100644
--- a/apps/infoalloggi/emails/base.tsx
+++ b/apps/infoalloggi/emails/base.tsx
@@ -41,7 +41,7 @@ const Base = ({
{preview}
-
+
-
+
-
+
{noreply && (
diff --git a/apps/infoalloggi/emails/gereric-email.tsx b/apps/infoalloggi/emails/gereric-email.tsx
index 4c6a0f0..6185b13 100644
--- a/apps/infoalloggi/emails/gereric-email.tsx
+++ b/apps/infoalloggi/emails/gereric-email.tsx
@@ -1,24 +1,33 @@
import { Button, Heading, Row, Section, Text } from "@react-email/components";
+import type { ReactNode } from "react";
import Base from "./base";
export type Generic_NewMail = {
mailType: "generic";
props: GenericProps;
};
-
+type Corpo = {
+ testo?: undefined;
+ corpo: ReactNode;
+};
+type Testo = {
+ testo: string;
+ corpo?: undefined;
+};
type GenericProps = {
title: string;
noreply?: boolean;
- testo: string;
+
link?: {
href: string;
label?: string;
};
-};
+} & (Corpo | Testo);
const Generic = ({
title,
noreply = false,
testo,
+ corpo,
link = undefined,
}: GenericProps) => {
return (
@@ -26,9 +35,13 @@ const Generic = ({
<>
{title}
-
- {testo}
-
+ {corpo ? (
+ corpo
+ ) : (
+
+ {testo}
+
+ )}
{link && (