@akanjs/ui 0.9.44 → 0.9.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/System/Client.js +3 -0
- package/esm/System/Client.js +3 -0
- package/package.json +1 -1
package/cjs/System/Client.js
CHANGED
|
@@ -30,6 +30,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
30
30
|
var import_base = require("@akanjs/base");
|
|
31
31
|
var import_client = require("@akanjs/client");
|
|
32
32
|
var import_common = require("@akanjs/common");
|
|
33
|
+
var import_dictionary = require("@akanjs/dictionary");
|
|
33
34
|
var import_next = require("@akanjs/next");
|
|
34
35
|
var import_signal = require("@akanjs/signal");
|
|
35
36
|
var import_store = require("@akanjs/store");
|
|
@@ -44,6 +45,8 @@ const Client = () => {
|
|
|
44
45
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
45
46
|
};
|
|
46
47
|
const ClientWrapper = ({ children, theme, lang = "en", dictionary = {} }) => {
|
|
48
|
+
if (!import_dictionary.serverTranslator.hasTranslator(lang))
|
|
49
|
+
import_dictionary.serverTranslator.setTranslator(lang, dictionary);
|
|
47
50
|
(0, import_react.useEffect)(() => {
|
|
48
51
|
import_common.Logger.rawLog(import_base.logo);
|
|
49
52
|
}, []);
|
package/esm/System/Client.js
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
storage
|
|
15
15
|
} from "@akanjs/client";
|
|
16
16
|
import { Logger } from "@akanjs/common";
|
|
17
|
+
import { serverTranslator } from "@akanjs/dictionary";
|
|
17
18
|
import { useFetch } from "@akanjs/next";
|
|
18
19
|
import { fetch } from "@akanjs/signal";
|
|
19
20
|
import { st } from "@akanjs/store";
|
|
@@ -28,6 +29,8 @@ const Client = () => {
|
|
|
28
29
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
29
30
|
};
|
|
30
31
|
const ClientWrapper = ({ children, theme, lang = "en", dictionary = {} }) => {
|
|
32
|
+
if (!serverTranslator.hasTranslator(lang))
|
|
33
|
+
serverTranslator.setTranslator(lang, dictionary);
|
|
31
34
|
useEffect(() => {
|
|
32
35
|
Logger.rawLog(logo);
|
|
33
36
|
}, []);
|