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 VerificaEmailMailTag = "verificaEmail";
|
|
|
|
|
export const VerificaEmailPropsSchema = z.object({
|
|
|
|
|
token: z.string(),
|
|
|
|
|
userId: z.string(),
|
|
|
|
|
redirect: z.string().optional(),
|
|
|
|
|
});
|
2025-08-04 17:45:44 +02:00
|
|
|
|
2026-04-03 11:51:55 +02:00
|
|
|
const VerificaEmail = ({
|
|
|
|
|
token,
|
|
|
|
|
userId,
|
|
|
|
|
redirect,
|
|
|
|
|
}: z.infer<typeof VerificaEmailPropsSchema>) => {
|
2025-08-29 16:18:32 +02:00
|
|
|
return (
|
|
|
|
|
<Base noreply preview="Verifica la tua email">
|
|
|
|
|
<>
|
|
|
|
|
<Heading className="text-center text-3xl leading-8">
|
|
|
|
|
Verifica la tua email
|
|
|
|
|
</Heading>
|
|
|
|
|
<Section className="px-4 text-center text-base md:px-12">
|
|
|
|
|
<Row>
|
|
|
|
|
<Text>
|
|
|
|
|
Clicca sul pulsante qui sotto per verificare la tua email.
|
|
|
|
|
</Text>
|
|
|
|
|
</Row>
|
2025-08-04 17:45:44 +02:00
|
|
|
|
2025-08-29 16:18:32 +02:00
|
|
|
<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}/auth/verifica-email-action?t=${token}&u=${userId}${redirect ? `&r=${redirect}` : ""}`}
|
2025-08-29 16:18:32 +02:00
|
|
|
>
|
|
|
|
|
Clicca qui per verificare
|
|
|
|
|
</Button>
|
|
|
|
|
</Section>
|
|
|
|
|
</>
|
|
|
|
|
</Base>
|
|
|
|
|
);
|
2025-08-04 17:45:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default VerificaEmail;
|