diff --git a/src/i18n.ts b/src/i18n.ts index e8ad7c6..53a96d8 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -79,7 +79,7 @@ const translations: Record = { "form.gender.n": "ani jedno/nechci odpovídat", "form.branch": "Chci kontaktovat odpovědnou osobu na pobočce:", - "form.is_client": "Jsem klientem této pobočky", + "form.is_client": "Jsem klientem/klientkou této pobočky", "form.message": "Text zprávy", "form.fill_the_options": "Vyplň možnosti", diff --git a/src/pages/[lang]/save.ts b/src/pages/[lang]/save.ts index 5ae075b..fde496a 100644 --- a/src/pages/[lang]/save.ts +++ b/src/pages/[lang]/save.ts @@ -3,7 +3,6 @@ import type { Lang } from "../../lang"; import { letterFormSchema } from "../../letter/schema"; import { db } from "../../db"; import { generateToken } from "../../utils"; -import { join } from "node:path"; import { mailClient } from "../../mail"; import { renderMail } from "../../mails/confirm-email"; @@ -70,15 +69,15 @@ async function sendConfirmationEmail( lang: Lang, letter: { id: number; email: string; confirmationToken: string } ) { - const confirmationUrl = join( - import.meta.env.PUBLIC_URL, - lang, - "confirm", - String(letter.id), - letter.confirmationToken + const confirmationUrl = new URL( + `${lang}/${confirm}/${letter.id}/${letter.confirmationToken}`, + import.meta.env.PUBLIC_URL ); - const { title, htmlBody, plainBody } = await renderMail({ lang, confirmationUrl }); + const { title, htmlBody, plainBody } = await renderMail({ + lang, + confirmationUrl: confirmationUrl.toString(), + }); return await mailClient.send({ subject: title,