@lovalingo/lovalingo 0.3.0 → 0.3.2

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.
@@ -299,14 +299,18 @@ navigateRef, // For path mode routing
299
299
  return;
300
300
  let cancelled = false;
301
301
  (async () => {
302
- const next = await apiRef.current.fetchEntitlements(locale);
303
- if (!cancelled && next)
304
- setEntitlements(next);
302
+ const bootstrap = await apiRef.current.fetchBootstrap(locale, window.location.pathname + window.location.search);
303
+ if (cancelled)
304
+ return;
305
+ if (bootstrap?.entitlements)
306
+ setEntitlements(bootstrap.entitlements);
307
+ if (bootstrap?.loading_bg_color)
308
+ setCachedLoadingBgColor(bootstrap.loading_bg_color);
305
309
  })();
306
310
  return () => {
307
311
  cancelled = true;
308
312
  };
309
- }, [defaultLocale, entitlements, locale]);
313
+ }, [defaultLocale, entitlements, locale, setCachedLoadingBgColor]);
310
314
  const applySeoBundle = useCallback((bundle, hreflangEnabled) => {
311
315
  try {
312
316
  const head = document.head;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.3.0";
1
+ export declare const VERSION = "0.3.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.3.0";
1
+ export const VERSION = "0.3.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovalingo/lovalingo",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "React translation runtime with i18n routing, deterministic bundles + DOM rules, and zero-flash rendering.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",