import { Link, Text } from "@react-email/components"; import React from "react"; import { createTranslator } from "use-intl/core"; import PrimaryButton from "../src/components/PrimaryButton"; import Wrapper from "../src/components/Wrapper"; import { defaultTranslations } from "../src/util/translations"; import { defaultLocale } from "../src/util/translations"; import type { BaseMailProps } from "../types"; export function NewUser({ url, name, otp, locale, translations, }: { url: string; name: string; otp: string; } & BaseMailProps) { const t = createTranslator({ locale, messages: translations, }); return ( {t("mail.newUser.body", { name })} {t("mail.common.otp")}
{otp}
{t("mail.common.useLink")} {t("mail.newUser.confirmEmail")} → {t("mail.common.openLinkInBrowser")} {url}
); } NewUser.PreviewProps = { locale: defaultLocale, translations: defaultTranslations, url: "#", name: "John Doe", otp: "123456", }; export default NewUser;