From 14bd9f03fa0ebbad6b95cd81d5512e9be1131e18 Mon Sep 17 00:00:00 2001 From: Ruben Talstra Date: Mon, 10 Mar 2025 12:48:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20refactor:=20Update=20getLoginErr?= =?UTF-8?q?or=20to=20use=20TranslationKeys=20for=20improved=20type=20safet?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/utils/getLoginError.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/utils/getLoginError.ts b/client/src/utils/getLoginError.ts index 27fafed0cf..492948d6e6 100644 --- a/client/src/utils/getLoginError.ts +++ b/client/src/utils/getLoginError.ts @@ -1,5 +1,7 @@ -const getLoginError = (errorText: string) => { - const defaultError = 'com_auth_error_login'; +import { TranslationKeys } from '~/hooks'; + +const getLoginError = (errorText: string): TranslationKeys => { + const defaultError: TranslationKeys = 'com_auth_error_login'; if (!errorText) { return defaultError;