@xyo-network/react-map 2.45.9 → 2.45.10

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.
@@ -2,31 +2,29 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useFindHashes = void 0;
4
4
  const react_network_1 = require("@xyo-network/react-network");
5
- const parseAnimatedAnswerHashes = () => {
6
- return [
7
- '79af071f451fc7af10d009dc63236ef9a9b211732c1ee0c06f028fcecf2336c5',
8
- '531bfba6d8dfefd3bcc888aca54cdbbd4574ed2b3ec551b230845a1f9a608898',
9
- 'c874412b4faa4947de81372fd1ba12fdd6f43f5e408622b7f357cb2bcb3f17cb',
10
- '29d3f8b882c61a82a1a1675782a27e797ea7196f45a23b4409680ab8b8d5f14e',
11
- 'cfd20f80ac073fd9518f4ef3f43d2a1f5e4e56e40c2677f38d6f6fecd05df60c',
12
- '1354fa73497519a39aed19fc99bdbae78a880a1eafb2f7898d607e07db36528d',
13
- '1043b0d25eacfc5013ae9dba780305a6fbf01a43543bd871d7c00537fca142a9',
14
- '973dfc5df142851ced258d52d0ac2784e814000ac22e35776f772256b0d4dde9',
15
- '463808eb74d3d87e6563970e0301a493577f8cd1b501e6e0ffa5e027ad2cea95',
16
- '15b21acea2e3fd9d1ace3768a72636ee7bdf67a6f8e0807bfa2273dea2207555',
17
- '32d377bfe7ebe382598c54dd13f8af7510e0a1e2fd2e913311fdd58e517e5e2e,',
18
- ];
19
- };
20
- const parseStaticAnswerHash = () => {
21
- return 'c7bbf61f61cfd4a1b2def160c28136fc1d100d39fbdb67b227a2c6e558d9d3a5';
22
- };
5
+ const react_1 = require("react");
6
+ const animatedAnswerHashesConst = [
7
+ '79af071f451fc7af10d009dc63236ef9a9b211732c1ee0c06f028fcecf2336c5',
8
+ '531bfba6d8dfefd3bcc888aca54cdbbd4574ed2b3ec551b230845a1f9a608898',
9
+ 'c874412b4faa4947de81372fd1ba12fdd6f43f5e408622b7f357cb2bcb3f17cb',
10
+ '29d3f8b882c61a82a1a1675782a27e797ea7196f45a23b4409680ab8b8d5f14e',
11
+ 'cfd20f80ac073fd9518f4ef3f43d2a1f5e4e56e40c2677f38d6f6fecd05df60c',
12
+ '1354fa73497519a39aed19fc99bdbae78a880a1eafb2f7898d607e07db36528d',
13
+ '1043b0d25eacfc5013ae9dba780305a6fbf01a43543bd871d7c00537fca142a9',
14
+ '973dfc5df142851ced258d52d0ac2784e814000ac22e35776f772256b0d4dde9',
15
+ '463808eb74d3d87e6563970e0301a493577f8cd1b501e6e0ffa5e027ad2cea95',
16
+ '15b21acea2e3fd9d1ace3768a72636ee7bdf67a6f8e0807bfa2273dea2207555',
17
+ '32d377bfe7ebe382598c54dd13f8af7510e0a1e2fd2e913311fdd58e517e5e2e,',
18
+ ];
19
+ const staticAnswerHashConst = 'c7bbf61f61cfd4a1b2def160c28136fc1d100d39fbdb67b227a2c6e558d9d3a5';
23
20
  const useFindHashes = () => {
24
21
  var _a, _b;
25
22
  const { network } = (0, react_network_1.useNetwork)();
26
23
  const exploreMapHashes = (_b = (_a = network === null || network === void 0 ? void 0 : network.nodes) === null || _a === void 0 ? void 0 : _a.find((node) => node.type === 'archivist')) === null || _b === void 0 ? void 0 : _b.explorerMapHashes;
27
- const animatedAnswerHashes = (exploreMapHashes === null || exploreMapHashes === void 0 ? void 0 : exploreMapHashes.animatedAnswerHashes) || parseAnimatedAnswerHashes();
28
- const staticAnswerHash = (exploreMapHashes === null || exploreMapHashes === void 0 ? void 0 : exploreMapHashes.staticAnswerHash) || parseStaticAnswerHash();
29
- return [staticAnswerHash, ...animatedAnswerHashes];
24
+ const animatedAnswerHashes = (exploreMapHashes === null || exploreMapHashes === void 0 ? void 0 : exploreMapHashes.animatedAnswerHashes) || animatedAnswerHashesConst;
25
+ const staticAnswerHash = (exploreMapHashes === null || exploreMapHashes === void 0 ? void 0 : exploreMapHashes.staticAnswerHash) || staticAnswerHashConst;
26
+ const foundHashes = (0, react_1.useMemo)(() => [staticAnswerHash, ...animatedAnswerHashes], [animatedAnswerHashes, staticAnswerHash]);
27
+ return foundHashes;
30
28
  };
31
29
  exports.useFindHashes = useFindHashes;
32
30
  //# sourceMappingURL=useFindHashes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFindHashes.js","sourceRoot":"","sources":["../../../src/hooks/useFindHashes.tsx"],"names":[],"mappings":";;;AAAA,8DAA2E;AAE3E,MAAM,yBAAyB,GAAG,GAAG,EAAE;IACrC,OAAO;QACL,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,mEAAmE;KACpE,CAAA;AACH,CAAC,CAAA;AAED,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACjC,OAAO,kEAAkE,CAAA;AAC3E,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,GAAG,EAAE;;IACzB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,0BAAU,GAAE,CAAA;IAChC,MAAM,gBAAgB,GAAG,MAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,CAAwB,0CAAE,iBAAiB,CAAA;IAC7H,MAAM,oBAAoB,GAAG,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,oBAAoB,KAAI,yBAAyB,EAAE,CAAA;IAClG,MAAM,gBAAgB,GAAG,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,gBAAgB,KAAI,qBAAqB,EAAE,CAAA;IAEtF,OAAO,CAAC,gBAAgB,EAAE,GAAG,oBAAoB,CAAC,CAAA;AACpD,CAAC,CAAA;AAEQ,sCAAa"}
1
+ {"version":3,"file":"useFindHashes.js","sourceRoot":"","sources":["../../../src/h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