From 0d98f28b9e5ddeaba678601b96133fd19b1722ed Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 8 May 2023 17:58:06 +0300 Subject: [PATCH] feat(client): delete generic success message in the alert (#49780) * change the flash message in profileui endpoint Co-authored-by: Oliver Eyton-Williams --- api/src/routes/settings.test.ts | 2 +- api/src/routes/settings.ts | 4 ++-- client/i18n/locales/english/translations.json | 1 - client/src/components/Flash/redux/flash-messages.ts | 1 - client/src/utils/tone/index.ts | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/api/src/routes/settings.test.ts b/api/src/routes/settings.test.ts index 5f908ebfeb2..91d58006ca7 100644 --- a/api/src/routes/settings.test.ts +++ b/api/src/routes/settings.test.ts @@ -62,7 +62,7 @@ describe('settingRoutes', () => { expect(response?.statusCode).toEqual(200); expect(response?.body).toEqual({ - message: 'flash.updated-preferences', + message: 'flash.privacy-updated', type: 'success' }); expect(user?.profileUI).toEqual(profileUI); diff --git a/api/src/routes/settings.ts b/api/src/routes/settings.ts index 9e6930e0f40..3dad05d2f06 100644 --- a/api/src/routes/settings.ts +++ b/api/src/routes/settings.ts @@ -30,7 +30,7 @@ export const settingRoutes: FastifyPluginCallbackTypebox = ( }), response: { 200: Type.Object({ - message: Type.Literal('flash.updated-preferences'), + message: Type.Literal('flash.privacy-updated'), type: Type.Literal('success') }), 500: Type.Object({ @@ -61,7 +61,7 @@ export const settingRoutes: FastifyPluginCallbackTypebox = ( }); return { - message: 'flash.updated-preferences', + message: 'flash.privacy-updated', type: 'success' } as const; } catch (err) { diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index 168e3bb2e05..acc87dc213d 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -594,7 +594,6 @@ "not-authorized": "You are not authorized to continue on this route", "could-not-find": "We couldn't find what you were looking for. Please check and try again", "wrong-updating": "Something went wrong updating your account. Please check and try again", - "updated-preferences": "We have updated your preferences", "updated-about-me": "We have updated your personal information", "updated-socials": "We have updated your social links", "updated-sound": "We have updated your sound settings", diff --git a/client/src/components/Flash/redux/flash-messages.ts b/client/src/components/Flash/redux/flash-messages.ts index 05a4a25af57..b625e6f14da 100644 --- a/client/src/components/Flash/redux/flash-messages.ts +++ b/client/src/components/Flash/redux/flash-messages.ts @@ -31,7 +31,6 @@ export enum FlashMessages { StartProjectErr = 'flash.start-project-err', TimelinePrivate = 'flash.timeline-private', TokenDeleted = 'flash.token-deleted', - UpdatedPreferences = 'flash.updated-preferences', UpdatedAboutMe = 'flash.updated-about-me', UpdatedSocials = 'flash.updated-socials', UpdatedSound = 'flash.updated-sound', diff --git a/client/src/utils/tone/index.ts b/client/src/utils/tone/index.ts index 5a98e6b708f..a072870b31b 100644 --- a/client/src/utils/tone/index.ts +++ b/client/src/utils/tone/index.ts @@ -46,7 +46,6 @@ const toneUrls = { [FlashMessages.StartProjectErr]: TRY_AGAIN, [FlashMessages.TimelinePrivate]: TRY_AGAIN, [FlashMessages.TokenDeleted]: CHAL_COMP, - [FlashMessages.UpdatedPreferences]: CHAL_COMP, [FlashMessages.UpdatedAboutMe]: CHAL_COMP, [FlashMessages.UpdatedKeyboardShortCuts]: CHAL_COMP, [FlashMessages.UpdatedPortfolio]: CHAL_COMP,