@ape.swap/bonds-sdk 2.6.1 → 2.6.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.
package/dist/main.js
CHANGED
|
@@ -75290,12 +75290,12 @@ const BondRowsWithTitle = ({ chain, bonds, hideTitles, showHotBonds }) => {
|
|
|
75290
75290
|
}), showHotBonds && (jsx$2(SwiperProvider, { children: jsx$2(HotBondCards, {}) }))] }, key))] }) }, key));
|
|
75291
75291
|
};
|
|
75292
75292
|
|
|
75293
|
-
const BondRowsByChain = ({ bonds, hideTitles }) => {
|
|
75293
|
+
const BondRowsByChain = ({ bonds, hideTitles, isCampaign = false }) => {
|
|
75294
75294
|
var _a;
|
|
75295
75295
|
const SDKConfig = useSDKConfig();
|
|
75296
75296
|
const validatedChains = (_a = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains) === null || _a === void 0 ? void 0 : _a.filter((chain) => MAINNET_CHAINS.includes(chain));
|
|
75297
75297
|
return (jsx$2(Flex$1, { className: "bondrowsbychain", children: validatedChains === null || validatedChains === void 0 ? void 0 : validatedChains.map((chain) => {
|
|
75298
|
-
return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: bonds, hideTitles: hideTitles, showHotBonds: hideTitles ? false : SDKConfig.useHotBonds ? chain === types.ChainId.BASE || chain === types.ChainId.MAINNET : false }, chain));
|
|
75298
|
+
return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: bonds, hideTitles: hideTitles, showHotBonds: hideTitles ? false : (!isCampaign && SDKConfig.useHotBonds) ? chain === types.ChainId.BASE || chain === types.ChainId.MAINNET : false }, chain));
|
|
75299
75299
|
}) }));
|
|
75300
75300
|
};
|
|
75301
75301
|
|
|
@@ -75501,6 +75501,7 @@ const Bonds = () => {
|
|
|
75501
75501
|
if (window.location.pathname.includes('bonds'))
|
|
75502
75502
|
campaign = 'combined';
|
|
75503
75503
|
}
|
|
75504
|
+
console.log('campaign', campaign);
|
|
75504
75505
|
const billsToRender = useMemo(() => {
|
|
75505
75506
|
let billsToReturn = filterOption === 'SOLD OUT' ? (allBonds !== null && allBonds !== void 0 ? allBonds : []) : (sortedBonds !== null && sortedBonds !== void 0 ? sortedBonds : []);
|
|
75506
75507
|
if (campaign === undefined || campaign === 'noCampaign') {
|
|
@@ -75549,7 +75550,7 @@ const Bonds = () => {
|
|
|
75549
75550
|
const handleChangeFilterOption = useCallback((newOption) => {
|
|
75550
75551
|
setFilterOption(newOption);
|
|
75551
75552
|
}, []);
|
|
75552
|
-
return (jsxs(Flex$1, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), jsx$2(BondsMenu, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onSort: handleSortOptions }), SDKConfig.useHotBonds && jsx$2(BuyAgainRow, {}), (billsToRender === null || billsToRender === void 0 ? void 0 : billsToRender.length) > 0 ? (jsx$2(BondRowsByChain, { bonds: billsToRender, hideTitles: searchQuery !== '' })) : searchQuery ? (jsx$2(PlaceholderMonkey, { text: 'No results' })) : filterOption === 'FAVORITES' ? (jsxs(Flex$1, { sx: {
|
|
75553
|
+
return (jsxs(Flex$1, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), jsx$2(BondsMenu, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onSort: handleSortOptions }), campaign !== 'xmas' && SDKConfig.useHotBonds && jsx$2(BuyAgainRow, {}), (billsToRender === null || billsToRender === void 0 ? void 0 : billsToRender.length) > 0 ? (jsx$2(BondRowsByChain, { bonds: billsToRender, hideTitles: searchQuery !== '', isCampaign: campaign === 'xmas' })) : searchQuery ? (jsx$2(PlaceholderMonkey, { text: 'No results' })) : filterOption === 'FAVORITES' ? (jsxs(Flex$1, { sx: {
|
|
75553
75554
|
width: '100%',
|
|
75554
75555
|
height: '300px',
|
|
75555
75556
|
background: 'white2',
|
|
@@ -75558,7 +75559,7 @@ const Bonds = () => {
|
|
|
75558
75559
|
alignItems: 'center',
|
|
75559
75560
|
flexDirection: 'column',
|
|
75560
75561
|
mt: '10px',
|
|
75561
|
-
}, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(Flex$1, { className: "bonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), SDKConfig.useHotBonds && jsx$2(RecommendationCards$1, {})] }));
|
|
75562
|
+
}, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(Flex$1, { className: "bonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), campaign !== 'xmas' && SDKConfig.useHotBonds && jsx$2(RecommendationCards$1, {})] }));
|
|
75562
75563
|
};
|
|
75563
75564
|
|
|
75564
75565
|
var BondsViewOptions;
|
|
@@ -4,6 +4,7 @@ import { BillsConfig } from '@ape.swap/apeswap-lists';
|
|
|
4
4
|
export interface BondRowsByChainProps {
|
|
5
5
|
bonds: (BondsData | BillsConfig)[];
|
|
6
6
|
hideTitles: boolean;
|
|
7
|
+
isCampaign: boolean;
|
|
7
8
|
}
|
|
8
9
|
declare const BondRowsByChain: React.FC<BondRowsByChainProps>;
|
|
9
10
|
export default BondRowsByChain;
|