diff --git a/app/lib/actions/userProfileActions.ts b/app/lib/actions/userProfileActions.ts index b02d22c..26f3ee8 100644 --- a/app/lib/actions/userProfileActions.ts +++ b/app/lib/actions/userProfileActions.ts @@ -107,7 +107,7 @@ export const getUserProfile = withUser(async (user: AuthenticatedUser) => { export const updateUserProfile = withUser(async (user: AuthenticatedUser, prevState: State, formData: FormData) => { noStore(); - const t = await getTranslations("account-form.validation"); + const t = await getTranslations("settings-form.validation"); const validatedFields = FormSchema(t).safeParse({ firstName: formData.get('firstName') || undefined, diff --git a/app/ui/AccountForm.tsx b/app/ui/AccountForm.tsx index bbda72d..4d48428 100644 --- a/app/ui/AccountForm.tsx +++ b/app/ui/AccountForm.tsx @@ -6,7 +6,7 @@ import { updateUserProfile } from "../lib/actions/userProfileActions"; import { useFormState, useFormStatus } from "react-dom"; import { useLocale, useTranslations } from "next-intl"; import Link from "next/link"; -import AccountCircleIcon from "@mui/icons-material/AccountCircle"; +import SettingsIcon from "@mui/icons-material/Settings"; import { formatIban } from "../lib/formatStrings"; import { InfoBox } from "./InfoBox"; @@ -22,7 +22,7 @@ type FormFieldsProps = { const FormFields: FC = ({ profile, errors, message }) => { const { pending } = useFormStatus(); - const t = useTranslations("account-form"); + const t = useTranslations("settings-form"); const locale = useLocale(); // Track current form values for real-time validation @@ -194,12 +194,12 @@ const FormFields: FC = ({ profile, errors, message }) => { export const AccountForm: FC = ({ profile }) => { const initialState = { message: null, errors: {} }; const [state, dispatch] = useFormState(updateUserProfile, initialState); - const t = useTranslations("account-form"); + const t = useTranslations("settings-form"); return (
-

{t("title")}

+

{t("title")}

@@ -9,6 +9,6 @@ export const PageHeader = () =>   - +
\ No newline at end of file diff --git a/messages/en.json b/messages/en.json index 68106c1..d9a1846 100644 --- a/messages/en.json +++ b/messages/en.json @@ -164,8 +164,8 @@ "validation-failed": "Validation failed. Please check the form and try again." } }, - "account-form": { - "title": "Profile Information", + "settings-form": { + "title": "Settings", "info-box-message": "By activating this option, a 2D barcode will be included in the monthly statement sent to the tenant, allowing them to make a direct payment to your bank account.", "tenant-2d-code-legend": "TENANT 2D CODE", "tenant-2d-code-toggle-label": "include 2D code in monthly statements", diff --git a/messages/hr.json b/messages/hr.json index 8cf92b0..569304a 100644 --- a/messages/hr.json +++ b/messages/hr.json @@ -163,8 +163,8 @@ "validation-failed": "Validacija nije uspjela. Molimo provjerite formu i pokušajte ponovno." } }, - "account-form": { - "title": "Podaci o profilu", + "settings-form": { + "title": "Postavke", "info-box-message": "Ako uključite ovu opciji na mjesečnom obračunu koji se šalje podstanaru biti će prikazan 2D bar kod, putem kojeg će moći izvršiti izravnu uplatu na vaš bankovni račun.", "tenant-2d-code-legend": "2D BARKOD ZA PODSTANARA", "tenant-2d-code-toggle-label": "prikazuj 2D barkod u mjesečnom obračunu",