@volr/react 0.2.2 → 0.2.5
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/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -10760,7 +10760,7 @@ function VolrProvider({ config, children }) {
|
|
|
10760
10760
|
const client = react.useMemo(() => {
|
|
10761
10761
|
if (!config.projectApiKey) {
|
|
10762
10762
|
throw new Error(
|
|
10763
|
-
"VolrProvider requires config.projectApiKey. Please
|
|
10763
|
+
"VolrProvider requires config.projectApiKey. Please provide projectApiKey in config."
|
|
10764
10764
|
);
|
|
10765
10765
|
}
|
|
10766
10766
|
return new APIClient({
|
|
@@ -19934,7 +19934,9 @@ Issued At: ${issuedAt}`;
|
|
|
19934
19934
|
if (apiBaseUrl.includes("dev-api") || apiBaseUrl.includes("localhost")) {
|
|
19935
19935
|
params.set("env", "dev");
|
|
19936
19936
|
}
|
|
19937
|
-
const
|
|
19937
|
+
const detectedLang = typeof navigator !== "undefined" ? navigator.language?.toLowerCase().startsWith("ko") ? "ko" : "en" : "en";
|
|
19938
|
+
const allowedLocales = config.allowedLocales;
|
|
19939
|
+
const lang = allowedLocales && !allowedLocales.includes(detectedLang) ? "en" : detectedLang;
|
|
19938
19940
|
params.set("lang", lang);
|
|
19939
19941
|
return `https://sign.volr.io?${params.toString()}`;
|
|
19940
19942
|
},
|