From 012a7071a7e4a55df337f2923f8f9adb269af489 Mon Sep 17 00:00:00 2001 From: bc-yevhenii-buliuk Date: Wed, 23 Oct 2024 14:27:28 +0300 Subject: [PATCH] fix(core): improve account settings form --- .changeset/fast-students-approve.md | 5 +++++ .../(tabs)/settings/_components/update-settings-form.tsx | 7 +------ core/messages/en.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 .changeset/fast-students-approve.md diff --git a/.changeset/fast-students-approve.md b/.changeset/fast-students-approve.md new file mode 100644 index 0000000000..ad6daf5053 --- /dev/null +++ b/.changeset/fast-students-approve.md @@ -0,0 +1,5 @@ +--- +"@bigcommerce/catalyst-core": patch +--- + +remove unnecessary fields from account settings form and update confirmation message diff --git a/core/app/[locale]/(default)/account/(tabs)/settings/_components/update-settings-form.tsx b/core/app/[locale]/(default)/account/(tabs)/settings/_components/update-settings-form.tsx index 33dd14c03c..5d6219931b 100644 --- a/core/app/[locale]/(default)/account/(tabs)/settings/_components/update-settings-form.tsx +++ b/core/app/[locale]/(default)/account/(tabs)/settings/_components/update-settings-form.tsx @@ -68,8 +68,6 @@ export enum FieldNameToFieldId { email = 1, firstName = 4, lastName, - company, - phone, } type FieldUnionType = keyof typeof FieldNameToFieldId; @@ -192,10 +190,7 @@ export const UpdateSettingsForm = ({ if (submit.status === 'success') { setFormStatus({ status: 'success', - message: t('successMessage', { - firstName: submit.data?.firstName, - lastName: submit.data?.lastName, - }), + message: t('successMessage'), }); } diff --git a/core/messages/en.json b/core/messages/en.json index 01b5f34698..96329e9681 100644 --- a/core/messages/en.json +++ b/core/messages/en.json @@ -204,7 +204,7 @@ "changePassword": "Change password", "submit": "Update settings", "submitting": "Update settings...", - "successMessage": "Dear {firstName} {lastName}, you successfully updated your account data", + "successMessage": "Your account settings have been updated", "validationMessages": { "email": "Enter a valid email such as name@domain.com", "empty": "This field can not be empty",