diff --git a/src/renderer/hooks/use-translation.hook.ts b/src/renderer/hooks/use-translation.hook.ts index 74fceca6..7403516f 100644 --- a/src/renderer/hooks/use-translation.hook.ts +++ b/src/renderer/hooks/use-translation.hook.ts @@ -1,14 +1,11 @@ -import { useMemo } from "react"; import { I18nService } from "renderer/services/i18n.service" export function useTranslation(): (translationKey: string) => string{ - - const i18nService = I18nService.getInstance(); + + const i18nService = I18nService.getInstance(); - return (key: string) => { - return useMemo(() => { - const tranlatables = key.split(" "); - return tranlatables.map((key) => i18nService.translate(key)).join(" "); - }, [key, i18nService.currentLanguage]); - } + return (key: string) => { + const tranlatables = key.split(" "); + return tranlatables.map((key) => i18nService.translate(key)).join(" "); + } } \ No newline at end of file