@ape.swap/bonds-sdk 1.0.685 → 1.0.686
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.
|
@@ -10,19 +10,21 @@ import { formatDollar, formatValue } from "../../utils/formatNumbers";
|
|
|
10
10
|
import getTimePeriods from "../../utils/getTimePeriods";
|
|
11
11
|
import { BLOCK_EXPLORER } from "../../config/constants/chains";
|
|
12
12
|
import { useState } from "react";
|
|
13
|
-
import { useNavigate } from "react-router-dom";
|
|
14
13
|
import '../../scss/BondRow.scss';
|
|
15
14
|
var BondRow = function (_a) {
|
|
15
|
+
// const navigate = useNavigate();
|
|
16
16
|
var _b, _c, _d;
|
|
17
17
|
var bond = _a.bond, hotBonds = _a.hotBonds;
|
|
18
|
-
var navigate = useNavigate();
|
|
19
18
|
// Modal
|
|
20
19
|
var _e = useState(false), isModalOpen = _e[0], setIsModalOpen = _e[1];
|
|
21
20
|
var _f = useState(null), selectedBond = _f[0], setSelectedBond = _f[1];
|
|
22
21
|
var rowClick = function (bond) {
|
|
23
22
|
setSelectedBond(bond);
|
|
24
23
|
setIsModalOpen(true);
|
|
25
|
-
|
|
24
|
+
if (typeof window !== "undefined") {
|
|
25
|
+
window.location.href = "/?bondAddress=".concat(bond.billAddress, "&bondChain=").concat(bond.chainId); // Browser-based navigation
|
|
26
|
+
}
|
|
27
|
+
// navigate(`/?bondAddress=${bond.billAddress}&bondChain=${bond.chainId}`, { replace: true });
|
|
26
28
|
};
|
|
27
29
|
// Functions for calcuations
|
|
28
30
|
var vestingTime = function (vestingTerm) {
|
|
@@ -12,7 +12,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
|
12
12
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
13
13
|
import { Flex, ThemeUIProvider } from 'theme-ui';
|
|
14
14
|
import axios from 'axios';
|
|
15
|
-
import { useNavigate } from 'react-router-dom';
|
|
16
15
|
import getTimePeriods from '../../utils/getTimePeriods';
|
|
17
16
|
import { defaultTheme } from '../../theme';
|
|
18
17
|
import { BigNumber } from 'bignumber.js';
|
|
@@ -23,8 +22,8 @@ import BondRowsByChain from '../../components/BondRows/BondRowsByChain';
|
|
|
23
22
|
import { useTopTags } from '../../hooks/useTopThreeTags';
|
|
24
23
|
import useChainFilterOption from '../../components/BondMenu/useChainFilterOption';
|
|
25
24
|
var Bonds = function (_a) {
|
|
25
|
+
// const navigate = useNavigate();
|
|
26
26
|
var account = _a.account, accountChainId = _a.accountChainId, isActive = _a.isActive, chains = _a.chains;
|
|
27
|
-
var navigate = useNavigate();
|
|
28
27
|
// Fetch data
|
|
29
28
|
var _b = useState([]), bondData = _b[0], setBondData = _b[1];
|
|
30
29
|
var _c = useState([]), hotBonds = _c[0], setHotBonds = _c[1];
|
|
@@ -118,7 +117,10 @@ var Bonds = function (_a) {
|
|
|
118
117
|
var rowClick = function (bond) {
|
|
119
118
|
setSelectedBond(bond);
|
|
120
119
|
setIsModalOpen(true);
|
|
121
|
-
|
|
120
|
+
if (typeof window !== "undefined") {
|
|
121
|
+
window.location.href = "/?bondAddress=".concat(bond.billAddress, "&bondChain=").concat(bond.chainId); // Browser-based navigation
|
|
122
|
+
}
|
|
123
|
+
// navigate(`/?bondAddress=${bond.billAddress}&bondChain=${bond.chainId}`, { replace: true });
|
|
122
124
|
};
|
|
123
125
|
// Functions for calcuations
|
|
124
126
|
var vestingTime = function (vestingTerm) {
|