From 6718e2eb234cd754ac0c3fe05a7193a708bf6d82 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 26 Jan 2020 19:53:57 +0100 Subject: TS func refactoring --- ui/src/i18next.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'ui/src/i18next.ts') diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index 2da3dfbe..a1fda907 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -27,10 +27,7 @@ const resources = { fi, }; -function format(value: any, format: any, lng: any) { - if (format === 'uppercase') return value.toUpperCase(); - return value; -} +const format = (value, format, lng) => format === 'uppercase' ? value.toUpperCase() : value; i18next.init({ debug: false, @@ -40,9 +37,7 @@ i18next.init({ lng: getLanguage(), fallbackLng: 'en', resources, - interpolation: { - format: format, - }, + interpolation: { format }, }); export { i18next as i18n, resources }; -- cgit v1.2.3