aboutsummaryrefslogtreecommitdiff
path: root/packages/web-util/src/context
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web-util/src/context')
-rw-r--r--packages/web-util/src/context/index.ts7
-rw-r--r--packages/web-util/src/context/translation.ts6
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(() => {