From e97c808b412167d334353c7f6370e6d8b70bc0ae Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 14 Dec 2022 15:17:15 -0300 Subject: moving testing sdk to web-utils --- packages/web-util/src/context/index.ts | 7 +++++-- packages/web-util/src/context/translation.ts | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'packages/web-util/src/context') 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 + source: Record; } // Outmost UI wrapper. @@ -62,7 +62,7 @@ export const TranslationProvider = ({ initial, children, forceLang, - source + source, }: Props): VNode => { const [lang, changeLanguage, isSaved] = useLang(initial); useEffect(() => { -- cgit v1.2.3