@chrryai/chrry 1.2.54 → 1.2.55

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.d.mts CHANGED
@@ -782,7 +782,7 @@ declare const isFirefox: boolean;
782
782
  declare function getFlag({ code }: {
783
783
  code?: string;
784
784
  }): string;
785
- declare const VERSION = "1.2.54";
785
+ declare const VERSION = "1.2.55";
786
786
  type instructionBase = {
787
787
  id: string;
788
788
  title: string;
package/dist/index.d.ts CHANGED
@@ -782,7 +782,7 @@ declare const isFirefox: boolean;
782
782
  declare function getFlag({ code }: {
783
783
  code?: string;
784
784
  }): string;
785
- declare const VERSION = "1.2.54";
785
+ declare const VERSION = "1.2.55";
786
786
  type instructionBase = {
787
787
  id: string;
788
788
  title: string;
package/dist/index.js CHANGED
@@ -20661,7 +20661,7 @@ function DataProvider({
20661
20661
  const [instructions, setInstructions] = (0, import_react14.useState)([]);
20662
20662
  const [affiliateStats, setAffiliateStats] = (0, import_react14.useState)(null);
20663
20663
  const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react14.useState)(false);
20664
- const VERSION3 = "1.2.54";
20664
+ const VERSION3 = "1.2.55";
20665
20665
  const [weather, setWeather] = useLocalStorage("weather", user?.weather || guest?.weather || void 0);
20666
20666
  const {
20667
20667
  API_URL: API_URL2,
@@ -21702,7 +21702,7 @@ var init_utils = __esm({
21702
21702
  window.history.replaceState({}, "", newUrl);
21703
21703
  };
21704
21704
  isFirefox = typeof navigator !== "undefined" && navigator?.userAgent.includes("Firefox");
21705
- VERSION = "1.2.54";
21705
+ VERSION = "1.2.55";
21706
21706
  getSlugFromPathname = (path) => {
21707
21707
  const siteConfig = getSiteConfig();
21708
21708
  return getAppAndStoreSlugs(path, {
@@ -22441,10 +22441,19 @@ function AppProvider({
22441
22441
  if (!apps?.length) return;
22442
22442
  if (!user && !guest) return;
22443
22443
  const i = user?.instructions || guest?.instructions || [];
22444
+ const uniqueInstructions = Array.from(
22445
+ new Map(i.map((instruction) => [instruction.id, instruction])).values()
22446
+ );
22444
22447
  if (!app) {
22445
- setInstructions(i.filter((x) => !x.appId));
22448
+ const filtered = uniqueInstructions.filter((x) => !x.appId);
22449
+ console.log(`\u{1F4CB} Instructions (no app): ${filtered.length} instructions`);
22450
+ setInstructions(filtered);
22446
22451
  } else {
22447
- setInstructions(i.filter((x) => x.appId === app.id));
22452
+ const filtered = uniqueInstructions.filter((x) => x.appId === app.id);
22453
+ console.log(
22454
+ `\u{1F4CB} Instructions for app "${app.name}" (${app.id}): ${filtered.length} instructions`
22455
+ );
22456
+ setInstructions(filtered);
22448
22457
  }
22449
22458
  }, [user, guest, app, apps]);
22450
22459
  const siteConfig = getSiteConfig();
@@ -28183,6 +28192,8 @@ function Instructions({
28183
28192
  [
28184
28193
  contextInstructions,
28185
28194
  app?.highlights,
28195
+ app?.id,
28196
+ app?.slug,
28186
28197
  isManaging,
28187
28198
  appFormWatcher?.highlights,
28188
28199
  app?.name