Files
turbostarter/packages/email/src/templates/auth/reset-password.tsx
Alejandro Gutiérrez 3527e732d4 feat: turbostarter boilerplate
Production-ready Next.js boilerplate with:
- Runtime env validation (fail-fast on missing vars)
- Feature-gated config (S3, Stripe, email, OAuth)
- Docker + Coolify deployment pipeline
- PostgreSQL + pgvector, MinIO S3, Better Auth
- TypeScript strict mode (no ignoreBuildErrors)
- i18n (en/es), AI modules, billing, monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:01:55 +01:00

58 lines
1.7 KiB
TypeScript

import { Heading, Preview, Text } from "@react-email/components";
import * as React from "react";
import { getTranslation } from "@turbostarter/i18n/server";
import { getOrigin } from "@turbostarter/shared/utils";
import { Button } from "../_components/button";
import { Layout } from "../_components/layout/layout";
import type {
EmailVariables,
EmailTemplate,
CommonEmailProps,
} from "../../types";
type Props = EmailVariables[typeof EmailTemplate.CONFIRM_EMAIL] &
CommonEmailProps;
export const ResetPassword = async ({ url, locale }: Props) => {
const { t } = await getTranslation({ locale, ns: "auth" });
const origin = getOrigin(url);
return (
<Layout origin={origin}>
<Preview>{t("account.password.update.email.preview")}</Preview>
<Heading className="leading-tight tracking-tight">
{t("account.password.update.email.subject")}
</Heading>
<Text>{t("account.password.update.email.body")}</Text>
<Button href={url}>{t("account.password.update.email.cta")}</Button>
<Text>{t("account.password.update.email.or")}</Text>
<code className="border-border bg-muted inline-block rounded-md border border-solid px-5 py-3.5 font-mono text-xs">
{url}
</code>
<Text className="text-muted-foreground">
{t("account.password.update.email.disclaimer")}
</Text>
</Layout>
);
};
ResetPassword.subject = async ({ locale }: CommonEmailProps) => {
const { t } = await getTranslation({ locale, ns: "auth" });
return t("account.password.update.email.subject");
};
ResetPassword.PreviewProps = {
url: "http://localhost:3000/api/auth/reset-password/KwiyWf9xsTrfndZY5a0stg4p?callbackURL=/auth/password/update",
locale: "en",
};
export default ResetPassword;