diff options
author | Sebastian <sebasjm@gmail.com> | 2022-12-14 15:17:15 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-12-14 15:17:15 -0300 |
commit | e97c808b412167d334353c7f6370e6d8b70bc0ae (patch) | |
tree | a0cfe2add2f6b369c858b81a01a20621fd79dc5b /packages/web-util/src/context | |
parent | ae2df08abd2da47c3b409d4f61d746825daa500d (diff) | |
download | wallet-core-e97c808b412167d334353c7f6370e6d8b70bc0ae.tar.xz |
moving testing sdk to web-utils
Diffstat (limited to 'packages/web-util/src/context')
-rw-r--r-- | packages/web-util/src/context/index.ts | 7 | ||||
-rw-r--r-- | packages/web-util/src/context/translation.ts | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/packages/web-util/src/context/index.ts b/packages/web-util/src/context/index.ts index 0ac2c752a..4bc1b22f2 100644 --- a/packages/web-util/src/context/index.ts +++ b/packages/web-util/src/context/index.ts @@ -1,2 +1,5 @@ - -export { InternationalizationAPI, TranslationProvider, useTranslationContext } from "./translation.js"; +export { + InternationalizationAPI, + TranslationProvider, + useTranslationContext, +} from "./translation.js"; diff --git a/packages/web-util/src/context/translation.ts b/packages/web-util/src/context/translation.ts index ce140ec42..3b79e31d3 100644 --- a/packages/web-util/src/context/translation.ts +++ b/packages/web-util/src/context/translation.ts @@ -19,7 +19,7 @@ import { ComponentChildren, createContext, h, VNode } from "preact"; import { useContext, useEffect } from "preact/hooks"; import { useLang } from "../hooks/index.js"; -export type InternationalizationAPI = typeof i18n +export type InternationalizationAPI = typeof i18n; interface Type { lang: string; @@ -54,7 +54,7 @@ interface Props { initial?: string; children: ComponentChildren; forceLang?: string; - source: Record<string, any> + source: Record<string, any>; } // Outmost UI wrapper. @@ -62,7 +62,7 @@ export const TranslationProvider = ({ initial, children, forceLang, - source + source, }: Props): VNode => { const [lang, changeLanguage, isSaved] = useLang(initial); useEffect(() => { |