@ape.swap/bonds-sdk 1.0.749 → 1.0.751

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.
@@ -9,7 +9,7 @@ import { Svg, TooltipBubble } from "../uikit-sdk";
9
9
  import { formatDollar, formatValue } from "../../utils/formatNumbers";
10
10
  import getTimePeriods from "../../utils/getTimePeriods";
11
11
  import { BLOCK_EXPLORER } from "../../config/constants/chains";
12
- import { useState } from "react";
12
+ import { useEffect, useState } from "react";
13
13
  import '../../scss/BondRow.scss';
14
14
  import { Flex } from "theme-ui";
15
15
  var BondRow = function (_a) {
@@ -19,17 +19,22 @@ var BondRow = function (_a) {
19
19
  // Modal
20
20
  var _e = useState(false), isModalOpen = _e[0], setIsModalOpen = _e[1];
21
21
  var _f = useState(null), selectedBond = _f[0], setSelectedBond = _f[1];
22
+ var _g = useState(window.location.href), url = _g[0], setUrl = _g[1];
22
23
  var rowClick = function (bond) {
23
24
  setSelectedBond(bond);
24
25
  setIsModalOpen(true);
25
26
  if (typeof window !== "undefined") {
26
27
  var newUrl = "/?bondAddress=".concat(bond.billAddress, "&bondChain=").concat(bond.chainId);
27
28
  window.history.pushState({ path: newUrl }, '', newUrl);
29
+ setUrl(newUrl); // Update the state to trigger a re-render
28
30
  }
29
31
  console.log('row clicked');
30
32
  console.log(bond);
31
33
  console.log('isModalOpen:', isModalOpen);
32
34
  };
35
+ useEffect(function () {
36
+ console.log('URL changed:', url);
37
+ }, [url]);
33
38
  // Functions for calcuations
34
39
  var vestingTime = function (vestingTerm) {
35
40
  return getTimePeriods(vestingTerm !== null && vestingTerm !== void 0 ? vestingTerm : 0, true);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.749",
6
+ "version": "1.0.751",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",